August 24, 2011 at 2:55 pm
I am running .bat file via SQL server schedule job under "Operating System (CmdExec)" command and my command is: E:\script\RunMy.bat
file.
It is giving me below error message:
Executed as user: MYSERVER_NT\SQLAGTdb. C:\Windows\system32>cd E:\data-integration\ C:\Windows\system32>Kitchen.bat /file:E:\Kettle-ETL\NextGen\Patient_Processing_with_start_audit.kjb /level:Basic 1>E:\Log\NextGenMPIJob.log 'Kitchen.bat' is not recognized as an internal or external command, operable program or batch file. Process Exit Code 1. The step failed.
Now I have give all the folder and file a necessary read and write permission and also added MSSQLSERVER$SQLAGNT$...**** account as well,
My OS: Win Server 2008 R2
Now, I have same job that run fine on SQL Server 2005 with Window Server 2005 but I am trying to migrate my process.
Please let me know your thoughts.
Thanks
Key
August 25, 2011 at 2:35 am
I have to admit that I tried using this option in jobs, possibly in sql 2000 but found it problematic, can't remember why now, may have been to do with return codes and getting the step to record a success/fail.
Since then I've always used xp_cmdshell. ( yes I know there are possible issues with xp_cmdshell )
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
August 25, 2011 at 6:32 am
Yes, Agree with your CSS... but it is very strange that it does work with SQL 2005 but 2008R2 giving me hickups....
I will continue to do further investigation and let you know if find any solution.
Thanks
Key
August 25, 2011 at 7:32 am
to me, the error looks like the Kitchen.bat is not found in any of the folders in the %PATH% variable.
the call looks like oyu expect it to exist inside \Windows\system32 folder...is that where it really is?
if you change ot to call it with the full path , ie E:\data-integration\Kitchen.bat(or wherever it really is), does that work?
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply