Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've a large Db and most of tables have relationship with each other. I wanna make Merge replication with another SQL Server. The problem is that when i create Merge replication it gives error "tblItem couled not be dropped, it has some foriegn key constraints". How can i avoid this problem and is there way to do it without dropping any article.

share|improve this question

migrated from stackoverflow.com Dec 30 '11 at 6:01

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You can change the properties of the article (or of all the articles) when you create the publication. You can also change this after the fact by editing the publication. You can setup the replication to drop the tables (the default), truncate the data, delete the data, or do nothing. IF you need to load the data on the subscriber from scratch you'll need to setup the articles to delete the data. This means it will take a lot longer to apply the snapshot. It would be best to make sure that all the foreign keys exist in the publisher so that the publisher knows in what order to drop and recreate the tables on the subscriber.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.