Ok, now we have set up the data for our test, lets do something that you wouldn't normally do. That is, we need to force a conflict between the source and target table by deliberately updating a record in the target table to a different value than in the source table. For our test we will choose PRODUCT_INFORMATION table under REPOE schema.
1. On the target table on the target server, run the following SQL to update the value
No Format |
---|
sqlplus repoe/repoe@ttorcl_trg |
The current value of the amount_received for prod_id 101 in the SALES table is NULL. Update this to 60 on the target.
No Format |
---|
UPDATE sales
SET amount_received = 60
WHERE sales_status = 'OVERDUE'
AND prod_id = 101;
COMMIT; |
...
REPOE@TTORCL_TRG> update repoe.product_information set PRODUCT_NAME='Dbvisit Replicate' where product_id=100;
REPOE@TTORCL_TRG> commit; |
By this command we created a difference between source and target table. This situation very often leads to conflict.
Now lets update the same column in the same record on the source (with a different value) and see what happens when Replicate tries to apply that change on the target.2. The AMOUNT_RECEIVED column in record PROD_ID = 101 in the target table now differs from the source.
3. Update the AMOUNT_RECEIVED for PROD_ID = 101 on the source database. On source server run the following SQL to update the value
...