[547] The ALTER TABLE statement conflicted with the FOREIGN
callscripterhelpdesk
Posts: 3
[547] The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "Foreign Key Name". The conflict occurred in database "Database Name", table "dbo.tbl_name", column 'id'.
(I've removed actual db / table names)
I have ignored Foreign Keys and compare / upgraded the two databases successfully. As soon as I add foreign keys back in I get the error.
The tables already exist in the destination db, just trying to add all the Foreign Keys back in. Any ideas?
(I've removed actual db / table names)
I have ignored Foreign Keys and compare / upgraded the two databases successfully. As soon as I add foreign keys back in I get the error.
The tables already exist in the destination db, just trying to add all the Foreign Keys back in. Any ideas?
CallScripter Helpdesk
Comments
In my case, the source database had records in the table where the "conflict" occured. I synched the data between the tables, and then added the FK and that did the trick.
The data & structure upgrade worked, but as soon as I add the constraints back in it fails.
I have even deleted the foreign key from the source database and it still fails!