You can create a filter for command line comparisions 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':
You can then set up the filter by entering the objects that you would like to exclude or include:
Once configured click OK and then click on the save icon just above 'Custom filter rules':
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
Please note that the switch/filter is not available for SQLDataCompare.exe.
Related documentation:
Was this article helpful?
Articles in this section
- The operation could not be performed because OLE DB provider ... for linked server ... was unable to begin a distributed transaction (SQL Compare)
- Docker Cannot connect to SQL Server Browser
- How to create a filter for command line comparisons
- SQL Compare Error: The Login is from an Untrusted Domain
- Error: Exiting since no license was found
- "No text is available" in SQL view
- Performance issues with SQL Data Compare
- Why comparison behaviour is different between the GUI and command line?
- Server Aliases not working when connecting with SQL Compare/SQL Data Compare