schedule task

EliBertEliBert Posts: 16
edited February 5, 2007 6:43AM in SQL Compare Previous Versions
Hi Y'all,

What's the best way to check wheter a comparison at night (scheduled tasks in a batch file) was succesfull or not?

Thanks in advance!
Bert

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Bert,

    The easiest way would be to use the %ERRORLEVEL% variable in your script after you run the SQL Compare, to check the return code. If you type in SQLCOMPARE.exe /? /verbose | more, then you can see the list of all the return codes. You could handle all possible return codes differently, but at the simplest, your next line of script can be:
    IF %ERRORLEVEL% GTR 0 GOTO ERROR
    ERROR:
    REM Do Something
    
Sign In or Register to comment.