SQL Compare filter get's different results when used in command line

When I use SQLCompare to compare my two databases and filter for object name to be like '%clause%' it gives me 10 differences, 6 missing and 31 identical which are correct.

However when I run the same compare thru the command line using the same (saved) filter it gives me 10 differences and 6 missing and no identical. If I add the "/include:identical" switch to the command line I get 994 identical objects regardless if the name contains the word "clause" or not.

Is this a bug? Or am i doing something wrong?

Answers

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi av99, thank you for your forum post.

    Can you please reply with the command line syntax you are using?  Obviously change any username/password combinations and server/databases names as required.

    The /filter switch cannot be used with /Include or /Exclude which will explain the 994 Identical objects being included.  See this help document and scroll down to the /Filter section.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • av99av99 Posts: 8 Bronze 3
    Here is the command line that i used for the compare (formatted to be better readable).

    Your help is much appreciated.

    E:\RedGate\SQLCompare11\SQLCompare.exe 
        /reporttype:interactive 
        /force 
        /server1:MYSERVER 
        /db1:MYDB 
        /snapshot2:E:\Snapshots\TRGTDB_20200923_010345.snp 
        /filter:E:\SQLCompare\Requests\custom_05.scpf 
        /report:E:\SQLCompare\Requests\report.html 
        /scriptFile:E:\SQLCompare\Requests\1.MYDB.sql 
        /out:E:\SQLCompare\Requests\results.txt
    /options:IgnoreFillFactor,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName,IgnoreWithNocheck,IgnoreExtendedProperties,IgnoreStatisticsNoRecompute,AddDatabaseUseStatement,DisableAndReenableDdlTriggers,ForceColumnOrder 

    Art.
  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    edited October 12, 2020 3:49PM
    Hi, thank you for your reply.

    Can you please confirm the contents of the filter file custom_05.scpf?  Does it match the filter configured through the GUI?

    The options you have set via the /options: switch, do they match the same options configured in the GUI (Edit Project ->Options tab)?

    Also can you please add the /Verbose and /LogLevel:Verbose switches to your cmd line syntax?

    If you run command from the cmd prompt, the /Verbose switch will display the console output.  Is there an entry that indicates that the filter file has been read?

    The /LogLevel:Verbose switch will create a log file in this path, each time you run your cmd line syntax with the switch included:
    C:\Users\<user name>\AppData\Local\Red Gate\Logs\SQL Compare\

    A support ticket has been created for you.  I will request a copy of the log file via the support ticket.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.