SQLTeam.com | Weblogs | Forums

Execute Operation system CmdExec ,prompt System :cannot find the specified file



every one!,i have a question about Sql server Agent job. I want to encrypt the file by job. this is my exe :encrypttotal.bat ,but this is bat cmd executed by click it. I put this in order to release the bat cmd job no matter , specified text can't find systems is presented.

Executed as user: NT Service\SQLSERVERAGENT. The process could not be created for step 1 of job 0xD911A51108C6D943BD3F7BD419017526 (reason: can't find Specified file.). The step failed."

Please tell me what to do.thank you !


Hi johnson,
You will have to ensure that the system account can access the folder and the file. It might be best to SQL and SQL agent using a named account (AD user), and grant the AD user permission on the bat file that you want it to execute.
You might also can setup runas/proxy account for it, I haven't tried it myself, but that should help you as well.


thanks for your help. I try it again today,it was successful !,i only changed its path,Before success,I use sql server Agent configure cmd,Unfortunate,it failed.but I gave it the full path at the command line,it was successful.I don't know why?
look as below:
before success:"encrypttotal.bat"
after success:" e:\outPut\cmd\encrypttotal.bat".
thank you again !