Resolving conflicts for source row wins

You can set conflict detection and resolution so that the source wins.

About this task

Use the Conflicts tab to set conflict detection and resolution so that the source wins. When CDC Replication resolves conflicts so that the source column wins, it applies the row from the source table to the target table. This ensures the target table row matches the data in your source table upon replication. For example, a remote location ships 100 books and updates their INVENTORY table to the latest quantity of the books. When CDC Replication attempts to replicate the update to the target table, it detects a conflict because there is no row to update. In this scenario, CDC Replication resolves the conflict by inserting the row from the source to the target.
This figure shows you how CDC Replication resolves a conflict when source wins.

Procedure

  1. Click Configuration > Subscriptions.
  2. Select the subscription.
  3. Click the Table Mappings view and select the table mapping from the Source Table column.

    This should be mapped for Standard replication.

  4. Right-click and select Open Details....
  5. Click the Conflicts tab.

    The Target Column displays all of the columns in the target table.

  6. Select the columns on which you want to detect conflicts.
  7. Select Source Wins from the Conflict Resolution Method list.
  8. Click Save.

    When you start replication on the subscription, if CDC Replication detects a conflict in the target column, the source data is replicated to the target.