By default, the Capture program captures an update to the source table as an UPDATE statement. However, you must instruct the Capture program to capture updates as DELETE and INSERT statements (that is, you must enable logical partitioning key support) under any of the following conditions:
Without replication logical partitioning key support, when the primary keys of either the source or target tables are being updated, the Capture program captures the changed row for the update. The Apply program then attempts to make an update to a row on the target table with the new key value. This new key value is not found in the target table, so the Apply program converts this update to an insert. The new row is fine, but the old row with the old key value remains in the table and is unnecessary. When you enable replication logical partitioning key support, the Capture program captures the change as separate DELETE and INSERT statements in the CD table.
For example, the primary key value for a table is the employee last name "Wood" and the employee gets married and changes her last name to "Smith". Without replication logical partitioning key support, when the Apply program updates the employee's last name with a new primary key value, it does not find the value "Smith" and inserts a new row. The row with the primary key value "Wood" is not deleted.
With replication logical partitioning key support, the row with the primary key value "Wood" is first deleted, and a new row with the primary key value "Smith" is inserted.
Use the Control Center to specify that the Capture program should support replication logical partitioning key support while defining the replication source. See Defining a Custom Replication Source to learn how to specify that updates are captured as DELETE and INSERT statements.