Groups | Blog | Home
all groups > sql server dts > september 2005 >

sql server dts : problem: foreign key constraints - referential integrity


Allan Mitchell
9/6/2005 12:00:00 AM
What this is telling you is that the constraint cannot be applied
because there is data in the child that does not have a link to the
parent.

I presume this DRI is in the Source so what is probably happening is one
of the following

The contraint is being applied before the parent is filled
The constraint was not enabled in the source hence why you have the data
in the source

Are you copying all tables? I would use BACKUP/RESTORE

Allan


[quoted text, click to view]
ND Developer
9/6/2005 9:10:02 AM
We've just performed a DTS copy objects and data from the production server
to the development server, but the DTS failed on updating the referential
integrity.

The following error is reported with the specific names of the database, fk,
table, and column replaced with generics in brackets:

Step Error Source: Microsoft SQL-DMO (ODBC SQLState: 23000)
Step Error Description:[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
TABLE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_[foreign
key]'. The conflict occurred in database '[database]', table '[Table]',
column '[Column]'.
Step Error code: 80040223
Step Error Help File:SQLDMO80.hlp
Step Error Help Context ID:1131
ND Developer
9/7/2005 10:56:09 AM
Thanks Allan,

We are currently doing a BACKUP/RESTORE

[quoted text, click to view]
AddThis Social Bookmark Button