Options

Compare one database with multiple databases

vodotnetvodotnet Posts: 2
edited January 26, 2009 10:22AM in SQL Compare Previous Versions
Hi there,

Is it possible to compare one database with multiple databases on the same server at the same time? i.e, one-to-many comparison, then apply the changes?

Here is the situation, we have several customers, each customer owns a database. We update the tables, stored procedure, etc, of a master database. We want those changes to be applied to the databases for all customers so the same website gateway work correctly when accessed by the various customers.

Can SQL Compare handle this?

Thanks,
Jamal

Comments

  • Options
    Unfortunately there are no plans to implement a 1 to many database comparison in SQL Compare. However, you can perform something like a 1 to many compare using the SQL Compare Command Line Interface (CLI). You are still comparing a pair of databases at any one time but you can construct a .bat file that lists all the comparison you wish to perform.

    For example DatabaseA is the database you want as the 1 and Databases B to D are the many part of your scenario.

    Your .bat file may look similar to this:

    sqlcompare server1:server_1 /server2:server_2 /database1:databaseA /database2:databaseB /sync

    sqlcompare server1:server_1 /server2:server_3 /database1:databaseA /database2:databaseC /sync

    sqlcompare server1:server_1 /server2:server_4 /database1:databaseA /database2:databaseD /sync

    Although you are still comparing a pair of databases at a time, the .bat file will loop through all the steps and you can perform a 1 to many compare. Further advice regarding the use of the CLI, can be found in the SQL Compare help file ->The command line interface section. Use this link to obtain the help file:
    http://www.red-gate.com/supportcenter/C ... c41845.htm
Sign In or Register to comment.