RedGate Compare CLI for all DBs on a tier

We have multiple SQL DB tiers (think SQL servers instances, or clusters) in our SQL Estate, each tier, in turn contains multiple, related, SQL DBs. I know how to use RedGate Compare CLI to diff and sync one DB at a time on each of these servers, but is there a better way to diff and sync all DBs on an instance concurrently, or sequentially? Or do I really have to write out a script that generates something like the below (don't worry I am using JIRA / Confluence as examples of DBs, not actual DBs we sync)

SQLCompare.exe /s1:Server1 /database1:JIRA   /s2:Server2 /database2:JIRA /exclude:view /exclude:Assembly /exclude:Schema /exclude:Role /exclude:User /exclude:Certificate /report:"C:\re
ports\JIRAReport.html" /reportType:Html /sync

SQLCompare.exe /s1:Server1 /database1:CONFLUENCE   /s2:Server2 /database2:CONFLUENCE /exclude:view /exclude:Assembly /exclude:Schema /exclude:Role /exclude:User /exclude:Certificate /report:"C:\re
ports\CONFLUENCEReport.html" /reportType:Html /sync
I would love some options that would auto map the DB names between server1 and server2 and then sync them using the options selected to a unified report. 
Tagged:

Best Answer

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi,
    Thank you for your forum post.

    There is no feature within SQL Compare, in the GUI or CLI to select multiple databases for a comparison.  The SQL Compare comparison engine can only compare one pair of databases at a time.

    The only method I am aware off is to generate a script in the manner you have described, where each pair of databases is compared.
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.