Detect and Resolve Merge Replication Conflicts
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
When a Publisher and a Subscriber are connected and synchronization occurs, the Merge Agent detects if there are any conflicts. If conflicts are detected, the Merge Agent uses a conflict resolver to determine which data will be accepted and propagated to other sites.
Although a Subscriber synchronizes with the Publisher, conflicts typically occur between updates made at different Subscribers rather than updates made at a Subscriber and at the Publisher.
Merge replication offers a variety of methods to detect and resolve conflicts. For most applications, the default method is appropriate:
If a conflict occurs between a Publisher and a Subscriber, the Publisher change is kept and the Subscriber change is discarded.
If a conflict occurs between two Subscribers using client subscriptions (the default type for pull subscriptions), the change from the first Subscriber to synchronize with the Publisher is kept, and the change from the second Subscriber is discarded. For information about specifying client and server subscriptions, see Specify a Merge Subscription Type and Conflict Resolution Priority (SQL Server Management Studio).
If a conflict occurs between two Subscribers using server subscriptions (the default type for push subscriptions), the change from the Subscriber with the highest priority value is kept, and the change from the second Subscriber is discarded. If the priority values are equal, the change from the first Subscriber to synchronize with the Publisher is kept.
For more information about conflict detection and resolution for merge replication, see Advanced Merge Replication Conflict Detection and Resolution.