I am using Sql Compare with the following commandline options:
C:\Program Files (x86)\Red Gate\SQL Change Automation PowerShell\SC\SQLCompare.exe
/sourcecontrol1 /sfx:"D:\...\SourceControl.txt"
/revision1:head
/db2:"DbName"
/s2:"ServerName"
/Synchronize
/filter:"D:\...\Filter.scpf"
/makebackup
/options:"DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName,IgnoreFullTextIndexing,UseClrUdtToStringForClrMigration,IgnoreCollations,IgnoreUsersPermissionsAndRoleMemberships"
/r:"D:\...\Report.html"
/rt:Classic
The filter.scpf file has the following to exclude the dbo schema:
<Schema version="1">
<Include>False</Include>
<Expression xsi:type="xsd:string">(@NAME = 'dbo')</Expression>
</Schema>
I also tried including only a specific schema like so:
<Schema version="1">
<Include>True</Include>
<Expression xsi:type="xsd:string">(@NAME = 'MySchema')</Expression>
</Schema>
Both methods don't exclude dbo, I added a dummy column to a dbo.table to test this and the dummy gets removed after running the command (using both methods).
The filter.scpf file has the following to exclude the dbo schema:
I also tried including only a specific schema like so:
Both methods don't exclude dbo, I added a dummy column to a dbo.table to test this and the dummy gets removed after running the command (using both methods).