07 - Confirm the Data is Replicated

As 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.

./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.

./record_count.bash

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

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

You can run the 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.