Ignore Constraint Names - still dropping constraints by name

griffinb87griffinb87 Posts: 3
edited January 13, 2011 3:24PM in SQL Compare Previous Versions
I have three databases:

Live database - it exists inside a hospital, so we can create a connection from SQL Compare.
Testing Database - this is an exact copy of Live database.
Development Database - a dev database that is out of sync with the other two - it has all of our new stuff.

Since we can't directly connect to the Live, we have Testing as an exact copy. We use SQL Compare to get an upgrade script to go from Testing to Development, and they copy that script to Live and update it.

The problem is that, even when I click "Ignore Constraint Names" - the upgrade script still has hard coded constraint names in it.

Is there anything I can do to get around this, besides renaming the constraints to something consistent?

Any ideas are appreciated.

Comments

  • Hi,

    The ignore constraint names option only affects the comparison stage, not the synchronization stage. So by ticking it, it won't flag objects as being different if the constraint name is the only difference, but if you have other diffs (such as a new column) then the constraints will be included when you sync.
    So really, the recommendation would be to name your constraints yourself rather than letting SQL create the names, as these will be different every time.
    Systems Software Engineer

    Redgate Software

  • Yeah, after thinking over it, there is nothing SQL Compare could possibly do to resolve that. We will start naming them by hand!

    Thanks.
  • Afraid so - hope it's not too much of a headache!
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.