...
On the target table on the target server, run the following SQL to update the value
No Format |
---|
sqlplus repoe/repoe@ttorcl_trg REPOE@TTORCL_TRG>repoe@TARGET REPOE@TARGET> update REPOE.PRODUCT_INFORMATION set PRODUCT_NAME='Dbvisit ReplicateStandby' where product_id=100; REPOE@TTORCL_TRG>REPOE@TARGET> commit; |
By this command we created a difference between source and target table. Situation, when target and source tables are not in sync can lead to an conflict.
...
Update the PRODUCT_INFORMATION for PRODUCT_ID=100 on the source database. On source server run the following SQL to update the value:
No Format |
---|
sqlplus repoe/repoe@ttorcl_src REPOE@TTORCL_SRC>repoe@SOURCE REPOE@SOURCE> update REPOE.PRODUCT_INFORMATION set PRODUCT_NAME='Dbvisit Replicate' where product_id=100; REPOE@TTORCL_SRC>REPOE@SOURCE> commit; |
This will create a conflict because the update statement will be replicated to the target database. The target value was already changed and so a conflict is created, where the row has already different value, than the source.
On the replication console the conflict will be shown:
...
The conflict itself arises, because value of PRODUCT_NAME='3qmaQueJ1Ou 5 aNzkUP8cmTjrO lvPj' and "PRODUCT_ID" = 100 cannot be found on target. . Remember the ID of the conflict (65010063922). We will use this number for resolving the conflict in next chapter.
The method of using past values of columns is common for most logical replication technologies.
Now, when the apply process is stopped, you have to decide, which value, should the target row have.
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.
For more information about 0 rows affected see Command affected 0 row(s) conflict on our online wiki page.
...