What are the challenges you face when working across database platforms? Take the survey

Confused about include identical and scripting

freecell1freecell1 Posts: 33
edited April 2, 2012 6:31AM in SQL Compare Previous Versions
I am trying to do the following:

1) Compare two databases via command line (automated).
2) If not identical, generate sync script.
3) If identical, do not create a script.

I hoped to be able to do this without getting error codes on identical databases, so I used include:identical. However that causes it to generate useless scripts when the databases are the same (lots of drop/add constraints etc). All I want is to suppress the error if they are the same, but not have an error occur.

This seems to not be possible. Do I have to write a console app to wrap the command line calls and ignore error 63?


  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    You could wrap the command in a batch file and exit /B with return code 0, but if you are using 10.1, you can use the undocumented /assertidentical switch. Hopefully you have the latter option available! (if not, please run Check for Updates)
Sign In or Register to comment.