Thursday, December 27, 2012 12:31 PM
How to guarantee that merge replication is going to apply changes or upload changes to the publisher in a specific or a predefined order ?
as i am looking to end the occurrence of FK constraint violation case, where merge agent tries to upload parent table changes before child table changes (Mainly inserts), as this causes the sync/ the merge session to fail.
I know about marking FK Constraints as "NOT FOR REPLICAITON"/Increasing generation batch size but these are not options right now, what i need is to either find a way to add the articles in an proper way so eliminates any chance for FK constriant vilation or force merge agent to apply changes according to a predefined order i can control, any ideas ?
Thursday, December 27, 2012 5:14 PMModeratorIf marking FK constraints NFR is not an option for you then you may want to look into the Merge article property @processing_order which indicates the processing order of articles in a merge publication. This can be set using sp_addmergearticle when adding article(s) or sp_changemergearticle to change existing article(s). Keep in mind this can be a time consuming property change and should be done during a maintenance window.
- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Sunday, January 06, 2013 12:32 PM