...
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 | ||
| ||
No Format | ||
| ||
CREATE public DATABASE LINKLINK link_name CONNECTCONNECT TO system IDENTIFIED BYBY password USING USING connect_string |
1. The system username and password to connect to the source and target database.
...
No outage of the source database is required because the SCN is used to extract the data out of the source data. This ensures that the data will be consistent at that particular point in time. Dbvisit Replicate will start replicating at the same point in time and therefore consistency is maintained between the source and target database.
Example
This example shows how Dbvisit Replicate generates
Following commands will add test1.emp table into the current replication and generate datapump script to load data into target database. Following environment is used in this example.
Object | Name |
---|---|
Source Database | reptest1 |
Target Database | reptest2 |
Database Link | reptest1_link |
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/password@reptest2
Created Data Pump script /home/oracle/reptest1/APPLY1.sh, using network import. |
Above command will generate following datapump script.
No Format | ||
---|---|---|
| ||
impdp SYSTEM/password@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). |