Search code examples
sqlsql-servertransactionsreplicationmerge-replication

Transactional publication with updatable subscriptions and Conflict Resolvers


I am able to find a great deal of documentation about creating custom conflict resolvers and using Managed code-based resolver as a business logic handler when replicating SQL Server using a "Merge publication" but can't seem to find anything about doing this same time of conflict resolution when using Transactional publication with updatable subscriptions

Is it possible to use a Merge Article Resolver when using Transactional publication with updatable subscriptions ?

Is there another suggested way to handle conflicts when using Transactional publication with updatable subscriptions ?


Solution

  • Is it possible to use a Merge Article Resolver when using Transactional publication with updatable subscriptions?

    No, it is not possible to utilize a Merge Article Resolver when using Transactional Replication with Updatable Subscriptions.

    Is there another suggested way to handle conflicts when using Transactional publication with updatable subscriptions?

    You cannot write custom conflict resolvers for Transactional Replication with Updatable Subscriptions. You can however choose one of the built-in conflict resolvers which are:

    • Publisher wins (the default)
    • Publisher wins and the subscription is reinitialized
    • Subscriber wins

    With that said, Microsoft recommends minimizing conflicts in the application by creating data partitions so that different Subscribers modify different sets of data, thus eliminating the chances of conflicts occurring.

    Also, keep my mind that Transactional Replication with Updatable Subscriptions is deprecated and the recommended alternative is Peer-to-Peer Replication or Merge Replication if you require robust conflict detection and resolution.