Command Line SQL Compare Exit Code

mfischermfischer Posts: 4
What do I need to add to my xml file to tell SQLCompare to exit cleanly when there is nothing to syncronize? We are currently getting an error code of 63 when there is nothing to syncronize. I simply want sqlcompare to return back that everything is in sync.
Melissa Fischer
Database Administrator
Business and Information Technology Unit
MN Department of Employment and Economic Development
1st National Bank Building
332 Minnesota Street, Suite E 200
St. Paul, MN 55101

Comments

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

    Both SQL Compare and Data Compare return 63 if the databases are equal. This is a clean exit; it just indicates that the program did not find any differences. It does return an exit code of 0 if it has successfully synchronized or produced a script. The program authors wanted to differentiate a successful operation from 'no work to do'

    Usually you can trap the error code and handle it in whatever application you are using to run the command-line program, whether you are using a batch file or a Windows Script Host. For batch files, you can check the %ERRORLEVEL% variable for 63 and handle it in the same way as if the program exited with 0.

    If you need any further advice, please let me know.
Sign In or Register to comment.