Comparing Triggers, Indexes and Constraints

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

Comparing Triggers, Indexes and Constraints

Postby geoffrobinson » Thu Apr 21, 2011 9:56 pm

When I compare two databases and examine the Differences collection, I see views, tables, functions and stored procedures.

I want to determine whether the triggers, indexes and constraints belonging to a particular table are the same. So that leads me to a few questions.

If a Difference is between 2 tables, do they get the value of DifferenceType.Equal only if all their triggers, indexes, and constraints are the same?

If not, can I test those types of objects against each other?

Thanks for any help in advance. Please let me know if I need to provide any additional information.
geoffrobinson
 
Posts: 3
Joined: Thu Apr 21, 2011 8:20 pm
Location: Philadelphia, PA, USA

Comparing Triggers, Indexes and Constraints

Postby Sian.Williams » Mon Apr 25, 2011 11:44 am

Thanks for contacting Red Gate.

They will only be classed as equal if every attribute is equal, assuming you are not ignoring indexes, triggers and constraints.

You cannot treat indexes, triggers and constraints as individual objects at this time, although there is a feature request for it, it is logged as SC-2447. You can quote this ID if you wish to chase this up in future.
--------------------------------------
Siân Williams
Red Gate Software
Tel: 0800 169 7433
sian.williams@red-gate.com
--------------------------------------
Sian.Williams
 
Posts: 32
Joined: Thu Aug 26, 2010 8:59 pm

Re: Comparing Triggers, Indexes and Constraints

Postby geoffrobinson » Mon Apr 25, 2011 3:28 pm

Sian.Williams wrote:They will only be classed as equal if every attribute is equal, assuming you are not ignoring indexes, triggers and constraints.


Thank you for your response.

Is including indexes, triggers and constraints the default option? In other words, do I have to specify they are included or is it the default?

It sounds like they are included and you have to specify to ignore them.
geoffrobinson
 
Posts: 3
Joined: Thu Apr 21, 2011 8:20 pm
Location: Philadelphia, PA, USA


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests