Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Snapshot Replication fails - ALTER TABLE statement conflicted with the FOREIGN KEY constraint

$
0
0

Hi Everyone,

i have a strange problem when using Snapshot Replication on a Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Standard Edition on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

I copy Data from a production-DB in a Test-DB. In "Article properties" I marked Copy foreign key constraints to "False" and ActionIfNameIsInUse to "Delete Data". When I ran the Replication the snapshot were created, but the distribution failed with the Error:

"The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_tbl1?GUID->tbl2?GUID". The conflict occurred in database "Training", table "tbl2", column 'GUID'."

First of all there are no FK's in the Test-Database. Second tbl1 is not part of the Snapshot. Maybe someone can help me out?

Dave


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>