I created a SQLFULL.CMD script for a full backup. The script runs fine when exectud from within windows. However, it fails when ran from a SQLagent or a query. I have enabled xp_cmdshell.
In the query window:
This works: exec xp_cmdshell 'ping localhost';
This fails with "null": exec xp_cmdshell 'C:\Progra~1\Micros~1\MSSQL.1\MSSQL\Backup\sqlfull.cmd';
I am not getting any info in the event log or the dsierror.log file to help troubleshoot.
The baffling part is that I can run it withing Windows but not SQL. any ideas?
In the query window:
This works: exec xp_cmdshell 'ping localhost';
This fails with "null": exec xp_cmdshell 'C:\Progra~1\Micros~1\MSSQL.1\MSSQL\Backup\sqlfull.cmd';
I am not getting any info in the event log or the dsierror.log file to help troubleshoot.
The baffling part is that I can run it withing Windows but not SQL. any ideas?