Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replication Deletes Primary Key Off Target

Status
Not open for further replies.

tourcd

IS-IT--Management
Dec 5, 2005
37
Hi,

I've set up transactional replication between two databases (first time I've tried doing this). ServerA is the source ServerB is the target.

I ran through the replication wizard on ServerA and published the articles I wanted. Then I created a new Push Subscription on ServerA that sends the data to ServerB.

This appeared to work okay but after a while I noticed that the Primary Keys on the tables on ServerB had disappeared. The data was there but the key had gone.

Can anyone explain why this has happened and if there's a way of preventing it?

Thanks
 
I've done some more digging and found that I can check the "Include declared referential integrity" option in properties of an article.

This should copy all primary key constraints, reference constraints, and unique constraints to the destination table if they exist on the source table at the Publisher.

Can I assume that this is the BEST way to solve my issue?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top