Resolving conflicts for largest value wins

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

Before you begin

Conflict detection and resolution is only available when you map your tables using Standard replication. Conflict detection and resolution is not available for the CDC Replication Engine for Teradata, the CDC Replication Engine for InfoSphere® DataStage® or the CDC Replication Engine for Event Server.

About this task

When CDC Replication resolves conflicts for largest value wins, it applies the change to the target if the source row has a larger value than the corresponding row on the target table. For example, if the comparison column contains revision times, then the target row matches the row that was most recently updated (largest time value).

When resolving conflicts for largest value wins, CDC Replication treats NULL values as the smallest possible value. If the row does not exist on the target table, then CDC Replication uses NULL as the comparison value. If CDC Replication detects the conflict while deleting a row, then it uses the before image of the source table and compares it to the target value. If both the source and target values are the same, then CDC Replication resolves the conflict using the Target Wins method (no change is applied to the target).

Procedure

  1. Click Configuration > Subscriptions.
  2. Select the subscription.
  3. Select the table mapping in the Table Mappings view.

    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 target columns on which you want to detect conflicts in the Detect Conflicts area.
  7. Select Largest Value Wins from the Conflict Resolution Method list.
  8. Select the column on the target table that you want to compare to the row on the source table from the Value Comparison Column .
  9. 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.