Selective compare on large database

Forum for users of SQL Compare schema synchronization utility

Selective compare on large database

Postby aspillert » Wed Jun 11, 2014 2:25 pm

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.
Posts: 12
Joined: Thu Sep 25, 2008 7:32 pm
Location: Boston, Massachusetts, USA

Postby stanori » Fri Jun 13, 2014 8:18 pm

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: ... 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: ... 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 Tanori
Product Support
Red Gate Software Ltd.
Posts: 84
Joined: Mon Apr 23, 2012 12:13 pm

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests