Home Forums SQL Server 2005 Backups Using Robocopy within SQL Agent job - headache with error codes! RE: Using Robocopy within SQL Agent job - headache with error codes!

  • In SMSS you can only specify a single exit code, so you could just pick one say 8 then in your batch file test for %errorlevel% and if it's an 8 or 16 just "Exit 8". Then the SQLAgent will fail the job on either 8 or 16. You would have to have a separate log to place the real error if you need the detail.