Versions Compared

Key

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

To confirm that the data is replicated the following query can be run on both the source and the target database.1. On the source serverAs you should see from the Replication Console, the target database is only a few records (usually a small number of seconds) behind the source database.

While SwingBench is still running in the other terminal window, on the source machine, as oracle, in the $HOME/replicate directory, execute the record_count.bash script to check the number of rows in each table and the sum total of all orders in both the source and target databases record_count.bash.

No Format
./record_count.bash

TABLE_NAME                     TTORCL_SRC  TTORCL_TRG
------------------------------ ----------- -----------
ADDRESSES                      750684      750672
CARD_DETAILS                   750645      750638
CUSTOMERS                      500631      500623
INVENTORIES                    900131      900131
LOGON                          1196213     1196135
ORDERENTRY_METADATA            4           4
ORDERS                         716549      716536
ORDER_ITEMS                    2148121     2148103
PRODUCT_DESCRIPTIONS           1000        1000
PRODUCT_INFORMATION            1000        1000
WAREHOUSES                     1000        1000

11 rows selected.

Sum of orders         TTORCL_SRC         TTORCL_TRG
------------- ------------------ ------------------
ORDERS         $3,584,875,457.00  $3,585,393,081.00

The numbers won't be the same as in the output above but you should see only a few records difference between the source and target.

When the SwingBench process stops after 10 minutes (or you can interrupt it with Ctrl C).

After a couple of seconds, the Replication Console will report 100% replication for all tables. Re-execute the record_count.bash script.

No Format
./record_count.bash
 
Note
This queries


TABLE_NAME                     TTORCL_SRC  TTORCL_TRG
------------------------------ ----------- -----------
ADDRESSES                      750816      750816
CARD_DETAILS                   750760      750760
CUSTOMERS                      500760      500760
INVENTORIES                    900131      900131
LOGON                          1196958     1196958
ORDERENTRY_METADATA            4           4
ORDERS                         716839      716839
ORDER_ITEMS                    2148955     2148955
PRODUCT_DESCRIPTIONS           1000        1000
PRODUCT_INFORMATION            1000        1000
WAREHOUSES                     1000        1000

11 rows selected.

Sum of orders         TTORCL_SRC         TTORCL_TRG
------------- ------------------ ------------------
ORDERS         $3,586,575,013.00  $3,586,575,013.00
Note

This record_count.bash script should give the approximately the same number numbers on the source and target database when the replication is < 100%.

Run You can run the queries script several times to see that the numbers are updating on both the source and target database. 

If the replication is at 100% then the numbers should be the same.

Fantastic! you have completed a simple one-way replication with Dbvisit Replicate.