Script tries to drop constraint that does not exist
dhsjphd
Posts: 4
I am evaluating SDC 5 and am trying to move data between two servers with slight schema differences (staging --> development) and am receiving the following error:
Has anyone else seen this and know of a workaround?
Is there a better way to move data between servers where foreign keys are involved?
The following error message was returned from the SQL Server: [3728] 'FK_wrk_lim_funds_promos' is not a constraint. Could not drop constraint. See previous errors.Why is this tool creating a script to drop a constraint/FK that does not exist?
Has anyone else seen this and know of a workaround?
Is there a better way to move data between servers where foreign keys are involved?
Comments
The constraint did exist but SDC generate the DROP command twice in the script. I saved the script then removed the duplicate statement and all was well.
Project Manager
Red Gate Software Ltd
I reverted to SQLData compare version 3 and it worked fine.
Darren
In a current case script there were 15 cases of FK DROP CONSTRAINT statement duplication ( out of 18 needed).
Note: I am running the script in SQL Server Management Studio. The issue did not occur on prior occasions running directly from SQLDataCompare.
One also wonders whether it would be better to Disable rather than DROP and ADD Constraints.
This has been fixed in our 6.0 branch of Data Compare, which should be released in the next couple of months.
If you want to get your hands on it earlier than that, you might like to take a look at the SDC 6 Alpha forum, as I believe the fix made it into the alpha release.
Hope that helps,
Rob
Red Gate
I think this is serious enough to have a hot fix for, or, alternatively, a proposal for an older version to use.
We're expecting to release SQL Data Compare 6 fairly soon - hopefully with a release candidate in the next few weeks - which should fix this bug.
Many thanks,
Robert
Red Gate