Including or excluding a schema in Filter.scpf seems to have no effect

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).
Tagged:

Answers

  • LouisSomersLouisSomers Posts: 23 Bronze 2
    When running the same command adding /verbose, the output shows this line three times:
    Event Aggregator: No registered listeners for RedGate.Compare.CommonUI.Shared.Events.FilterChangedThe full log is included in the support ticket (268965).
  • John_GeJohn_Ge Posts: 1 New member
    having the same issue SQL Compare V14.7.8.21163, gui vs command line. command line doesn't actually filter, but the GUI does.
Sign In or Register to comment.