Detecting and Resolving Merge Replication Conflicts

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. For a complete list of conflict types, see the "Conflict Types" section of How Merge Replication Detects and Resolves Conflicts.

Note

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 How to: 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.