Ignore Constraint Names - still dropping constraints by name
griffinb87
Posts: 3
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.
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
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.
Redgate Software
Thanks.
Redgate Software