Setting conflict detection and resolution

Conflict detection and resolution lets you detect, log, and act on inconsistent data on the target.

This ensures your replication environment handles data conflicts automatically and in accordance with your business rules. Set conflict detection so that CDC Replication can detect and resolve conflicts as they occur. As conflicts are detected and resolved, CDC Replication logs them in a conflict resolution audit table.

During replication, CDC Replication detects conflicts when you:

  • Insert a row and the row's key already exists in the target table. This violates the unique key constraint.
  • Update a row and the row's key does not exist in the target table.
  • Update a row and the contents of the rows in the source table and target table, before the update, do not match.
  • Delete a row and the row's key does not exist in the target table.
  • Delete a row and the contents of the rows in the source table and target table, before the delete, do not match.

CDC Replication does not detect conflicts in target columns that are:

  • Populated with expressions using the %BEFORE, %CURR, %GETCOL, and %USER column functions.
  • Populated with journal control fields.
  • Not populated by a value.
Notes:
  • CDC Replication does not detect conflicts in columns that have Large Object (LOB) data types.
  • Conflict detection and resolution is only available when you map your tables using Standard replication.
  • When employing conflict detection and resolution, there is no explicit or implied collation sequence used when comparing string values.
  • Conflict detection and resolution is available for the CDC Replication Engine for Teradata when JDBC apply mode is employed, but not for TPUMP apply mode.
  • Conflict direction and resolution is not available for the CDC Replication Engine for Netezza® Technology
  • CDC Replication will add data continuously to the audit table as conflicts occur, but will never purge data from the table. Depending on the number of conflicts, the audit table will to grow in size over time. It is the user's responsibility to schedule maintenance (such as using a DELETE FROM statement) on the conflict resolution audit table regularly. A good practice would be to remove the applicable information from the audit table after you have resolved each conflict.
  • Conflict detection and resolution should not be used when targeting tables with multiple uniqueness constraints. CDC Replication does not enforce this. If conflict detection and resolution is configured for a mapping targeting a table with multiple uniqueness constraints errors will occur when applying.
  • When selecting columns for conflict detection, avoid choosing columns that have a unique value generated by the target database (such as identity columns not mapped to source columns).