• Rod at work (3/11/2014)


    sreekanth bandarla (3/11/2014)


    I think, That's where you are having issues with. Type it manually and let me know how it goes...

    syntax:

    sqlcmd -S .\SQLEXPRESS -E -Q "EXEC master..sp_BackupDatabases @backupLocation='C:\SQLBackups\', @backupType='F'" -o "C:\SQLBackups\Backupjob_Log.txt"

    Also, double check your Instance Name. Looks like you are using "EXPRESS" instead of "SQLEXPRESS" in your batch file.

    I've made a change to the batch file, but it appears to not have made a difference. Do I have to remove the job from the Task Scheduler and re-enter it, in order for it to see the change? (I ask this because I've seen that sort of behavior before; especially with Crystal Reports. Crystal would tend to read the whole SQL query, even if it's a stored procedure, and then store that into itself, so if you made any change to the SP, Crystal never saw it.)

    Okay, Let's forget about scheduling here for a while....Have you tried running the batch file from command prompt manually and see the results file? May be....you can also try running the batch file something like yourbatchfile.cmd > output.txt and verify the output.txt file.