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

Foreign Key Error with Transactional Replication from Backup

$
0
0

I'm getting a missing foreign key error when I begin transactional replication:

Steps taken:

Created a pull publication(live server)
Created a copy only full backup
Restored backup on reporting server
Created a pull subscription on from backup(live server)
Created a pull subscription on subscriber(reporting server)

I'm getting errors soon after looking through replication monitor:
* The INSERT statement conflicted with the FOREIGN KEY constraint.
* The issue is it's trying to insert a record into a table for which their's no corresponding record(although the record does exist on the live server). Unless I've missed a step I'm not sure why this is happening. I had suspected it may be a case of distribution records getting cleaned up  too early so I disabled the SQL Agent job but it's still happening.

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 4054

Trending Articles



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