Options

How would I exclude all non dbo objects from comparison

kasipkasip Posts: 5
edited March 15, 2010 6:03AM in SQL Compare Previous Versions
I want to exclude all non dbo objects from comparison from the command line. Not sure what the expression would be to do so. If any one can I help, I would greatly appreciate it. Thank you.

Comments

  • Options
    Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post.

    Yes you can use custom filters with SQL Compare command line but you need to follow few steps:

    1. Create Customer filer in SQL Compare UI.
    2. Save the Filter it will be saved filters are saved with the extension .scpf by default in following path: %USERPROFILE%\My Documents\SQL Compare\Filters
    3. That from command line use the FILTER switch as shown in following description.

    /Filter

    Alias: /ftr

    Specifies a custom filter to select objects for synchronization.

    sqlcompare /db1:WidgetStaging /db2:WidgetProduction /sync

    /Filter:MarketingViewsOnly.scpf

    You can set up a filter to include or exclude objects based on their type, name, and owner (schema) name.

    This is useful, for example, if you want to create complex selection rules without using regular expressions.

    Note that:

    filters are set up in the graphical user interface
    filters are saved with the extension .scpf
    /Filter cannot be used with /Include or /Exclude
    if you use /Filter with /Project, the filter you specify overrides any filter used in the project

    Kindly let us know if this answers your question.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Options
    Anu DAnu D Posts: 876 Silver 3
    Did the above suggestion solved the purpose?

    Kindly let me know if you need any help.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
Sign In or Register to comment.