Command Line: Compare 2 snapshots and script security change

badpig521badpig521 Posts: 3
edited June 4, 2013 9:09AM in SQL Compare Previous Versions
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:
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"

Comments

  • 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
Sign In or Register to comment.