Versions Compared

Key

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

What is Data instantiation

...

1. Ensure that the REPOE schema is clean. Run the following drop script to ensure that there are no REPOE objects. If there are then the DataPump script will fail. Do this by executing the the record_count.bash script  script in the the $HOME/replicate directory  directory of the the source machine machine. This will show you the record counts for the source and target tables but it will also show you if the target tables have not been created. (which is what you want). If there are then the DataPump script will fail.

No Format
cd $HOME/replicate
./record_count.bash
TABLE_NAME                     TTORCL_SRC  TTORCL_TRG
------------------------------ ----------- -----------
ADDRESSES                      750003      *No Table*
CARD_DETAILS                   750003      *No Table*
CUSTOMERS                      500003      *No Table*
INVENTORIES                    900131      *No Table*
LOGON                          1191500     *No Table*
ORDERENTRY_METADATA            4           *No Table*
ORDERS                         714895      *No Table*
ORDER_ITEMS                    2143687     *No Table*
PRODUCT_DESCRIPTIONS           1000        *No Table*
PRODUCT_INFORMATION            1000        *No Table*
WAREHOUSES                     1000        *No Table*
11 rows selected.

Sum of orders         TTORCL_SRC         TTORCL_TRG
------------- ------------------ ------------------
ORDERS         $3,572,944,731.00               $.00

...

No Format
sqlplus system/manager@ttorcl_trg
SQL> CREATE DATABASE LINK ttorcl_src CONNECT TO system IDENTIFIED BY manager USING 'ttorcl_src';
Note

This database link is needed for the Datapump script that is created

...

as APPLY.sh. The content of datapump

...

script APPLY.sh

...

noformat

 is similar to the following. DO NOT COPY THE CONTENT. This is just an example. 

Code Block
impdp SYSTEM/manager@ttorcl_trg table_exists_action=TRUNCATE network_link=ttorcl_src directory=DATA_PUMP_DIR flashback_scn=564273 tables=REPOE.ADDRESSES,REPOE.CARD_DETAILS,REPOE.CUSTOMERS,REPOE.INVENTORIES,REPOE.LOGON,REPOE.ORDERENTRY_METADATA,REPOE.ORDERS,REPOE.ORDER_ITEMS,REPOE.PRODUCT_DESCRIPTIONS,REPOE.PRODUCT_INFORMATION,REPOE.WAREHOUSES   logfile=REPOE_WAREHOUSES.log JOB_NAME=DP_dbvrep_XE_0001

 

The flashback_scn number (in this example 564273) determines the consistency point as to where the data will be loaded to. All data prior to this SCN will be loaded using the above DataPump script. All data past this SCN will be replicated using Dbvisit Replicate.

3. On the source server, as oracle, in the $HOME/dbvrep_XE directory, execute the APPLY.sh script. This script will take approximately 3 - 9 minutes to complete depending on your host machine.

No Format
cd $HOME/dbvrep_XE
./APPLY.sh 

The output will be similar to:

...

On the source machine, as oracle, in the $HOME/replicate directory, execute the record_count.bash script to check the record counts between the two databases.

No Format
cd $HOME/replicate
./record_count.bash
TABLE_NAME                     TTORCL_SRC  TTORCL_TRG
------------------------------ ----------- -----------
ADDRESSES                      750003      750003
CARD_DETAILS                   750003      750003
CUSTOMERS                      500003      500003
INVENTORIES                    900131      900131
LOGON                          1191500     1191500
ORDERENTRY_METADATA            4           4
ORDERS                         714895      714895
ORDER_ITEMS                    2143687     2143687
PRODUCT_DESCRIPTIONS           1000        1000
PRODUCT_INFORMATION            1000        1000
WAREHOUSES                     1000        1000

11 rows selected.

Sum of orders         TTORCL_SRC         TTORCL_TRG
------------- ------------------ ------------------
ORDERS         $3,572,944,731.00  $3,572,944,731.00

...