...
However, The Oracle Data Pump scripts can also be manually created by running the following command:
Section | ||
---|---|---|
Column | ||
| ||
Panel | ||
No Format | ||
| ||
ENGINE PREPARE_DP WRITE DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE... |
This command is part of the *.dbvrep script that is created by the setup wizard and is run as part of the *-all.sh or *-all.bat script to configure the replication. This command can be used to generate datapump script after adding table(s)/schema(s) into an already running replication by using prepare command.
...
2. The SQL*Net TNS connections to connect to the source and target database using network import. The network_link has to be created manually in the target database. If the network link is not in place the following error message is displayed "ORA-39200: Link name "xxx" is invalid". The network link can be created with command:
Section | ||
---|---|---|
Column | ||
| ||
Panel | ||
No Format | ||
| ||
CREATE public DATABASE LINK LINK link_nameCONNECT CONNECT TO system IDENTIFIEDBY password USING BY password USING connect_string |
1. The system username and password to connect to the source and target database.
...
Object | Name |
---|---|
Source Database | reptest1 |
Target Database | reptest2 |
Database Link | reptest1_link |
Section | ||
---|---|---|
Column | ||
| ||
Panel | ||
No Format | ||
| ||
dbvrep>ENGINE PREPARE_DP SETUP CLEAR dbvrep>PREPARE TABLE TEST1.EMP Connecting to running apply [TEST1.EMP]: [Apply table removed (0 metadata record(s)). Apply table added (1 metadata record(s)).] Connecting to running mine [TEST1.EMP]: [Table prepared (321356 internal records).] Table test1.temp instantiated at SCN 6704096 dbvrep>ENGINE PREPARE_DP WRITE DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE /home/oracle/reptest1/APPLY2.sh DBLINK reptest1_link USERID SYSTEM/odb10g@reptest2 Created Data Pump script /home/oracle/reptest1/APPLY1.sh, using network import. |
Above command will generate following datapump script.
Section | ||
---|---|---|
Column | ||
| ||
Panel | ||
No Format | ||
| ||
impdp SYSTEM/odb10g@reptest2 table_exists_action=TRUNCATE network_link=reptest1_link directory= DATA_PUMP_DIR flashback_scn=6704096 tables=TEST1.emp logfile=TEST1_temp.log JOB_NAME=DP_reptest1_0001 |
Note |
---|
ENGINE PREPARE_DP SETUP CLEAR command removes the old metadata of any previous prepare command(s). |