Transaction replication and foreign keys | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Transaction replication and foreign keys

I set up transaction replication, and it worked allright for a few hours. Then there was a referential integrity error, which should not appear because if the transactions are replicated in the right order (in the same order the source database executes them) all records should exist and no referential integrity issues should occur.
Can someone explain why the replication doesn’t work?
When I set all my FK’s to not for replication all goes well.

Foreign key constraints, check constraints, and triggers at the Subscriber do not require the NOT FOR REPLICATION option because they will be disabled during the concurrent snapshot generation and will be enabled after the snapshot is generated. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>