How can we help you today? How can we help you today?

Command Line: Compare 2 snapshots and script security change

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"
badpig521
0

Comments

1 comment

  • badpig521
    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
    0

Add comment

Please sign in to leave a comment.