...
No Format |
---|
[oracle@source dbvrep_orcl]$ scp /home/oracle/dbvrep_orcl/dbvrep_orcl-run-target.sh oracle@target-int:/home/oracle/dbvrep_orcl/ oracle@target-int's password: dbvrep_orcl-run-target.sh |
9. On the target server (dbv02), setup the database link
No Format |
---|
SQL> CREATE public DATABASE LINK ttorcl_src CONNECT TO system IDENTIFIED BY oracle USING 'ttorcl_src'; |
This database link is needed for the Datapump script that is created as APPLY.sh. The content of datapump script APPLY.sh is similar to:
No Format |
---|
impdp SYSTEM/oracle@ttorcl_trg table_exists_action=TRUNCATE network_link=ttorcl_src directory=DATA_PUMP_DIR flashback_scn=14415748 tables=OE.ADDRESSES,OE.CARD_DETAILS,OE.CUSTOMERS,OE.INVENTORIES,OE.LOGON,OE.ORDERENTRY_METADATA,OE.ORDERS,OE.ORDER_ITEMS,OE.PRODUCT_DESCRIPTIONS,OE.PRODUCT_INFORMATION,OE.WAREHOUSES logfile=OE_WAREHOUSES.log JOB_NAME=DP_dbvrep_orcl_0001 |
The flashback_scn number (in this case 14415748) 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.
10. On the source server (dbv01) start the APPLY.sh script
No Format |
---|
$ ./APPLY.sh
Import: Release 11.2.0.2.0 - Production on Sat Dec 28 19:55:26 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."DP_DBVREP_ORCL_0001": SYSTEM/********@ttorcl_trg table_exists_action=TRUNCATE network_link=ttorcl_src directory=DATA_PUMP_DIR flashback_scn=14491671 tables=OE.ADDRESSES,OE.CARD_DETAILS,OE.CUSTOMERS,OE.INVENTORIES,OE.LOGON,OE.ORDERENTRY_METADATA,OE.ORDERS,OE.ORDER_ITEMS,OE.PRODUCT_DESCRIPTIONS,OE.PRODUCT_INFORMATION,OE.WAREHOUSES logfile=OE_WAREHOUSES.log JOB_NAME=DP_dbvrep_orcl_0001
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 1.008 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . imported "OE"."ORDER_ITEMS" 4290023 rows
. . imported "OE"."INVENTORIES" 900632 rows
. . imported "OE"."ORDERS" 1429790 rows
. . imported "OE"."ADDRESSES" 1500000 rows
. . imported "OE"."CUSTOMERS" 1000000 rows
. . imported "OE"."CARD_DETAILS" 1500000 rows
. . imported "OE"."LOGON" 2382984 rows
. . imported "OE"."PRODUCT_DESCRIPTIONS" 1000 rows
. . imported "OE"."PRODUCT_INFORMATION" 1000 rows
. . imported "OE"."ORDERENTRY_METADATA" 4 rows
. . imported "OE"."WAREHOUSES" 1000 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
Job "SYSTEM"."DP_DBVREP_ORCL_0001" successfully completed at 20:20:50
[oracle@source dbvrep_orcl]$ |
Note | ||
---|---|---|
During the import of the data, the archiver will become stuck because there will not be enough space. Run the following script a few times on the target server (dbv02) to ensure that the flash recovery area does not fill up and pause the import:
|