Selective compare on large database

aspillertaspillert Posts: 20
edited June 13, 2014 4:18PM in SQL Compare Previous Versions
It would be very nice to be able to compare only certain types of objects on a large database. I support a database with over 10,000 tables, views, stored procedures, functions, and accounts. I regularly maintain views used for reporting which always begin with "v_" because none of the vendors code begins with the letter "V" and an underscore. I would like to compare only views starting with "v_".

Comparing the whole database is time consuming and more cumbersome to work with then it could be, when I'm concerned with a tiny fraction of the whole.
AlanCHB

Comments

  • Hi aspillert,

    Thanks for the post. In your particular situation, there are a few options available that you can try to tackle this scenario.

    First possibility:
    - Create a filter that contains a rule that includes just views that start with v. Here is an article about setting up filters:
    https://documentation.red-gate.com/disp ... ng+filters

    - once the filter is setup you can then save the settings as a project and then the next time you want to run the comparison you can setup a cmd line job to run sql compare and make use of the project file

    Second possibility:
    - create a command line job that makes use of the /include(or vice versa the /exclude switch) to include just certain object types or object names in the command. Here are some more details about setting up the command line:
    https://documentation.red-gate.com/disp ... mmand+line

    Along with these different solutions, it is also important to note that which ever method you go with, part of the designed behavior of SQL Compare is that it will need to register each database source each time a comparison is run. The number of objects in a database source can increase the amount of time it takes to process a comparison. This database registration is a required step of the application so that it can understand the current state of your database schema and dependencies.

    I hope this helps.

    Best Regards,
    Steve
    _________________
    Steve Tanori
    Product Support
    Red Gate Software Ltd.
    866-997-0378
Sign In or Register to comment.