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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Dec 30 '11 at 6:01

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

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


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