Selective compare on large database

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Selective compare on large database

Postby aspillert » Wed Jun 11, 2014 3: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.
AlanCHB
aspillert
 
Posts: 6
Joined: Thu Sep 25, 2008 8:32 pm
Location: Boston, Massachusetts, USA

Postby stanori » Fri Jun 13, 2014 9: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:
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
stanori
 
Posts: 84
Joined: Mon Apr 23, 2012 1:13 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests

cron