Versions Compared

Key

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

Simple DML operations:

Before we start, we should ensure, that replication is setup correctly and is running. Connect to dbvrep console using script start-console.sh on either source or target machine:

...

No Format
languagesql
[oracle@source replicate]$ sqlplus repoe/repoe@TARGET
SQL> set lines 200 pages 999
SQL> select * from REPOE.CARD_DETAILS where card_type='REPOE_TEST';

   CARD_ID CUSTOMER_ID CARD_TYPE                      CARD_NUMBER EXPIRY_DATE        I SECURITY_CODE
---------- ----------- ------------------------------ ----------- ------------------ - -------------
    750004        1287 REPOE_TEST                      9102450385 25-MAY-17          Y          1000


Simple DDL operation 

Let's try a bit more complex command - Create table as select:

...

This query uses database link created before and checks for any rows, that are in source database and are not present in target database and vice versa. If it returns some rows, than something bad happened.

Batch DML operation:

Lets update all rows in REPOE.TABLES table on SOURCE database:

...