Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

8. As can be seen from the SQL statement in the above list conflict, the SQL statement contains the OLD value of "AMOUNT_RECEIVED IS NULL". This is the reason for the "Command affected 0 rows". The AMOUNT_RECEIVED was updated from NULL to 60 on the target database in step 1 . The and so the original value of "AMOUNT_RECEIVED IS NULL" is no longer valid. In order to detect such changes in the data, the replication has added the old value of the value to be update in the where predicates.the where predicate. This is true for most logical replication technologies.

9. Decide which value should be kept on the target database. Do you want to keep the value of AMOUNT_RECEIVED = 60 or AMOUNT_RECEIVED = 120? In this case we are going to keep the value of AMOUNT_RECEIVED = 120 as this is the value on the source system.

10. Resolve the conflict. There are different options to resolve the conflict. They can be viewed here: Resolving Current Conflict. In this case the update is going to be forced on the target so that both source and target will be in sync. The conflict handler is OVERWRITE

No Format
dbvrep> resolve conflict 724010046998 as OVERWRITE
Note

Use command "help resolve conflict" to view information about this command

No Format
dbvrep> help resolve conflict                                                                                                                                                   
RESOLVE: RESOLVE CONFLICT id AS resolution: Resolve conflict on apply as IGNORE, IGNOREALL, OVERWRITE, FORCE, RETRY, RESTART, ROLLBACK or ABORT.

11. The conflict will be resolved. The OVERWRITE removes the "AMOUNT_RECEIVED IS NULL" from the where clause to enable the update to proceed. The command console will no longer show the conflict. Note the Conflicts counter for table OE.SALES shows 1

No Format
APPLY IS running. Currently at plog 724 and SCN 14884102 (12/29/2013 15:21:38).
...
OE.SALES:                     100%  Mine:5/5             Unrecov:0/0         Applied:5/5         Conflicts:1/1       Last:29/12/2013 15:19:04/OK