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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy