Command Line: Compare 2 snapshots and script security change

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

Command Line: Compare 2 snapshots and script security change

Postby badpig521 » Mon Jun 03, 2013 4:21 pm

How do I use the command line SQL COMPARE to compare 2 snapshots and use /scriptfile to only create the security change script or sync the users and roles for the database. This is what I am using now:

Code: Select all
Invoke-Expression -Command "&'C:\\Program Files (x86)\\Red Gate\\SQL Compare 10\\sqlcompare.exe' /Snapshot1:$Path1\\$database.snp /Snapshot2:$Path2\\$database.snp /filter: /scriptfile:$scripts /force"
badpig521
 
Posts: 2
Joined: Fri May 31, 2013 11:34 pm
Location: United States

Postby badpig521 » Tue Jun 04, 2013 2:09 pm

Code: Select all
Invoke-Expression -Command "&'C:\\Program Files (x86)\\Red Gate\\SQL Compare 10\\sqlcompare.exe' /Snapshot1:$Path1\\$database.snp /Snapshot2:$Path2\\$database.snp /filter:C:\\SQL_SERVERS\\SQL_COMPARE\\sec.scpf /scriptfile:$scripts /force"


Worked using the /filter and a saved filter from the GUI
badpig521
 
Posts: 2
Joined: Fri May 31, 2013 11:34 pm
Location: United States


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests