sqlcompare command line create database if not exists on server2
BobTheBuilder
Posts: 1 New member
Copying databaseA on ServerA to a new serverB, no databases exist on serverB. The GUI allows to create a new database, but what is the command line switch to do the same?
sqlcompare.exe /server1:serverA /username1: /password1: /database1:database /server2:serverB /username2: /password2: /database2:database /include:identical /sync
sqlcompare.exe /server1:serverA /username1: /password1: /database1:database /server2:serverB /username2: /password2: /database2:database /include:identical /sync
Tagged:
Answers
The GUI functionality isn't part of the comparison and so this isn't in the command line version of the tool. The best way to achieve this would be to use SQLCMD inside your CMD script to create the database before calling a comparison.
Please do let me know if you need any further assistance in the future.
Dan Bainbridge
Product Support Engineer | Redgate Software