March 2, 2006 at 11:34 am
Dear fellow Admins:
I have a batch file (datename.cmd) in this case that works just fine from File Explorer and the command line. When I run it from a job, the job reports sucess; however the it appears to not run. What the .cmd file does is rename a log file to a dated version.
So far in my job i've tried a couple to methods to no avail:
Running as T-SQL –
exec master..xp_cmdshell 'E:\sqllogs\trax\datename.cmd'
Running as Operating System Command –
cd /d E:\sqllogs\trax
E:\sqllogs\trax\datename.cmd
- And just simply as
E:\sqllogs\trax\datename.cmd
Thanks for any help on this
William
March 2, 2006 at 9:46 pm
hi.
save u file with the extension .bat.
and try again.
from
killer
March 3, 2006 at 11:17 am
No 'raj' ... the .bat or .cmd only changes the address space the command file executes in. .bat is shared 16 bit space and .cmd is protected 32 bit space.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
March 6, 2006 at 8:11 pm
Put ECHO ON at the start of the .cmd file, and redirect the output to a file and see what is happening.
Could be a DOS environment issue or path issue.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply