automate SQL Compare to run against several target servers

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

automate SQL Compare to run against several target servers

Postby dbdmora » Wed Jun 13, 2012 7:21 pm

What is the best way to automate SQL Compare to run against several target servers and put the differences it finds in either .HTML or xml format. I do not want to change the target servers but get a report on the difference first.

Thanks for any info.
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby David Atkinson » Wed Jun 13, 2012 8:47 pm

Invoke the command line (assuming you have the pro version of SQL Compare).

Loop through your database target names using these switches:

sqlcompare.exe /s1:yoursourceserver /db1:yoursourcedatabase /s2:yourtargetdb /db2:yourtargetdb /reporttype:Interactive /report:yourreport.html /force

There are a number of different report types you can try. More info here:
http://www.red-gate.com/supportcenter/c ... _in_the_cl

David Atkinson
Red Gate
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest