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

sqlcompare command line create database if not exists on server2

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 


  • Options
    Hi BobTheBuilder,

    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.
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software
Sign In or Register to comment.