How to Create a Filter for Command Line Comparisons

Create a filter by opening a new project in the SQL Compare UI. You can then run a comparison on any two DBs (source and target). It doesn't matter which Databases you are comparing because you're only interested in setting up a new filter.

Once you have run the initial comparison click on 'Custom filter rules':

mceclip0.png

You can then set up the filter by entering the objects that you would like to exclude or include:

mceclip1.png

Once configured click OK and then click on the save icon just above 'Custom filter rules':

mceclip2.png

mceclip4.png

You should now have a filter file (.scpf) that you can include in your command. Here is an example of how to include the .scpf file in your command:

SQLCompare.exe /s1:Server1 /db1:DB1 /s2:Server2 /db2:DB2 /filter:C:\filters\AbdulsFilter.scpf

Related documentation:

Using Filters

Using the command line

 

 

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request