SQL Compare - server wide compares (Question)

djinni69djinni69 Posts: 13
edited September 11, 2006 12:19PM in SQL Compare Previous Versions
I want to use SQL Compare as a baselining tool, and I'm having great success so far. I have a question though. Currently, I am using the command line interface for SQL Compare Pro to compare snapshots (my baselines) to a live SQL Server. Is there an easy way to compare all databases on a server, or am I stuck with creating a script for each individual database compare? It doesn't really matter if a whole server compare isn't available, I'm just being lazy :) Thoughts?

Comments

  • Hi,

    Sorry for the delay. Maybe this batch script will give you some idea about how you could compare all databases on a server to a snapshot using a DOS batch file. Note you'll need osql.exe, which is part of the SQL Server client-side-tools installation if you want to try to run this command from a workstation:
    C:\Program Files\Red Gate\SQL Bundle 5>for /F %i in ('osql -S BRIAN -d master -Q
     "set nocount on; select name from sysdatabases where name not in ('master','mod
    el','msdb')" -E') do sqlcompare /s1:BRIAN /sn1:"c:\mysnapshot.snp" /db2:"%i"
    
This discussion has been closed.