Comparing Triggers, Indexes and Constraints

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.

Comments

  • 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
    [email protected]
  • 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.
Sign In or Register to comment.