I call a batch command to be ran in a SQL job.
My current syntax is this:
DECLARE @rc int
EXECUTE @rc = master.dbo.xp_cmdshell 'c:\SQLBAT~1\Filemovedata.bat'
PRINT @rc
IF (@rc = 0)
PRINT 'Move Successful'
ELSE
PRINT 'Move Failed'
Obviously the success/fail of this script is false and deceiving. The SQL script runs correctly but I have no stop gaps if the actual .bat file fails....
any possibility to do this?
Looking for suggestions/alternatives..
Thanks