This section initialises and starts the replication processes.
1. Go into the home directory of the replication that has been setup by the setup wizard
No Format |
---|
cd ~oracle/dbvrep_XEreplicate |
2. The configuration scripts can be inspected if needed. They are in the ./config directory.
No Format |
---|
[oracle@source replicate]$ ls ./config dbvrep_XEreplicate-dbsetup_ttorclSOURCE_srcdbvrep.sql dbvrep_XEreplicate-grants_ttorclSOURCE_trgdbvrep.sql replicate-onetime.ddc dbvrep_XEreplicate-wizard-databases.cfg dbvrep_XEreplicate-wizard-tablespairs.cfg dbvrep_XEreplicate-dbsetup_ttorclTARGET_trgdbvrep.sql dbvrep_XE-onetime.ddc dbvrep_XE-wizard-ddc.cfg dbvrep_XE-grants_ttorcl_srcreplicate-grants_TARGET_dbvrep.sql dbvrep_XEreplicate-setup.dbvrep replicate-wizard-ddc.cfg dbvrep_XE-replicate-wizard-pairstables.cfg |
The following types of scripts are in the config directory
- SQL scripts. These scripts will run SQL statements in the source or target databases.
- CFG scripts. These are used in the setup wizard to remember user inputs. The setup wizard can be run again and the previous input will be displayed based on information in the .cfg files.
- DDC scripts. These scripts contain all the configurational settings for the replication.
- DBVREP script. This script runs Dbvisit Replicate commands and initialises the replication.
3. The dbvrep_XEreplicate-all.sh in the $HOME/dbvrep_XEreplicate directory is the main script that calls all the other scripts to initialise the replication. Start this script.
No Format |
---|
./dbvrep_XEreplicate-all.sh |
4. The replication is now being initialised. This takes approximately 2-3 minuteswill take some time to complete.
No Format |
---|
[oracle@source replicate]$ ./replicate-all.sh Setting up Dbvisit Replicate configuration Configure database ttorcl_srcSOURCE... Enter password: This check fails if the DBID is not the expected one... Ok, check passed. Configure database ttorcl_trgTARGET.... Enter password: This check fails if the DBID is not the expected one... Ok, check passed. Object grants for database ttorcl_srcSOURCE... Enter password: Object grants for database ttorcl_trgTARGET... Enter password: Setting up the configuration Initializing......done WARN-1850: No DDC DB available, dictionary table does not exist. DDC loaded from database (0 variables). Dbvisit Replicate version 2.78.00 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /u01/app/oracle/dbvrep_XEreplicate/config/dbvrep_XEreplicate-onetime.ddc loaded. MINE: Cannot determine Dbvisit Replicate dictionary version. (no dictionary exists) APPLY: Cannot determine Dbvisit Replicate dictionary version. (no dictionary exists) dbvrep> #clear the no-DDC-DB-available warning dbvrep> process clear previous warnings dbvrep> set ON_WARNING SKIP Variable ON_WARNING set to SKIP for process *. dbvrep> set ON_ERROR EXIT Variable ON_ERROR set to EXIT for process *. dbvrep> dbvrep> PROCESS SWITCH_REDOLOG# Configuring default processes dbvrep> PROCESSchoose SETUPprocess MINE DROPProcess DICTIONARYtype 0MINE dictionaryset objectsto: droppedMINE. dbvrep> PROCESSchoose SETUPprocess MINEAPPLY CREATEProcess DICTIONARYtype dbvrep>APPLY PROCESSset SETUPto: MINEAPPLY. LOADdbvrep> DICTIONARYPROCESS SupplementalSWITCH_REDOLOG loggingRedo onlog databaseswitch setrequested.dbvrep> LoadingPROCESS SETUP dictionaryMINE tableDROP DBRSCOL$DICTIONARY Loading0 dictionary tableobjects DBRSIND$dropped. Loadingdbvrep> dictionaryPROCESS tableSETUP DBRSOBJ$MINE LoadingCREATE dictionaryDICTIONARY tabledbvrep> DBRSTAB$PROCESS LoadingSETUP dictionaryMINE tableLOAD DBRSUSER$DICTIONARY LoadingOldest dictionaryactive table DBRSV_$DATABASE dbvrep> PROCESS SETUP APPLY DROP DICTIONARY 0 dictionary objects dropped. dbvrep> PROCESS SETUP APPLY CREATE DICTIONARY dbvrep> PROCESS SETUP APPLY LOAD DICTIONARY dbvrep> PROCESS PREPARE_DP SETUP CLEAR dbvrep> PROCESS SETUP PAIR MINE AND APPLY Applier SCN set (start=513646, current=513646). dbvrep> SET APPLY.INSTANTIATE_SCN NOW Variable INSTANTIATE_SCN set to NOW for process APPLY. dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_UNCMP #Ignore tables created by Compression Advisor Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_CMP #Ignore tables created by Compression Advisor Exclude rule created. dbvrep> SET PREPARE_SCHEMA_EXCEPTIONS none Variable PREPARE_SCHEMA_EXCEPTIONS set to none for process *. dbvrep> PROCESS SUPPLEMENTAL LOGGING SCHEMA "REPOE" ENABLE PRIMARY KEY dbvrep> PROCESS SWITCH_REDOLOG dbvrep> PROCESS WAIT_SCN_FLIP Waited 2 seconds until scn_to_timestamp changed. dbvrep> #single-scn instantiation: lock all tables and schemas dbvrep> PROCESS LOCK SCHEMAS "REPOE" Locking all schemas. Lock done. dbvrep> #single-scn instantiation: unlock all tables and schemas, but keep the SCN dbvrep> PROCESS LOCK RELEASE LOCKS dbvrep> dbvrep> #prepare the tables (we use OFFLINE as neither MINE not APPLY is running; with OFFLINE we won't wait on network timeout) dbvrep> PREPARE OFFLINE SCHEMA "REPOE" Table REPOE.ADDRESSES instantiated at SCN 515210 Table REPOE.CARD_DETAILS instantiated at SCN 515210 Table REPOE.CUSTOMERS instantiated at SCN 515210 Column SYS_NC00017$ is special: virtual column. Excluding. Column SYS_NC00017$ is special: hidden column. Excluding. Column SYS_NC00017$ is special: system-generated column. Excluding. Column SYS_NC00017$ is special: virtual column. Excluding. Column SYS_NC00018$ is special: virtual column. Excluding. Column SYS_NC00018$ is special: hidden column. Excluding. Column SYS_NC00018$ is special: system-generated column. Excluding. Column SYS_NC00018$ is special: virtual column. Excluding. Table REPOE.INVENTORIES instantiated at SCN 515210 Table REPOE.LOGON instantiated at SCN 515210 Table REPOE.ORDERENTRY_METADATA instantiated at SCN 515210 Table REPOE.ORDERS instantiated at SCN 515210 Table REPOE.ORDER_ITEMS instantiated at SCN 515210 Table REPOE.PRODUCT_DESCRIPTIONS instantiated at SCN 515210 Table REPOE.PRODUCT_INFORMATION instantiated at SCN 515210 Table REPOE.WAREHOUSES instantiated at SCN 515210 dbvrep> dbvrep> transaction SCN: 579781 (no active transaction) Supplemental logging on database set. Loading dictionary table DBRSCCOL$ Loading dictionary table DBRSCDEF$ Loading dictionary table DBRSCOL$ Loading dictionary table DBRSIND$ Loading dictionary table DBRSOBJ$ Loading dictionary table DBRSTAB$ Loading dictionary table DBRSUSER$ Loading dictionary table DBRSV_$DATABASE dbvrep> PROCESS SETUP APPLY DROP DICTIONARY 0 dictionary objects dropped. dbvrep> PROCESS SETUP APPLY CREATE DICTIONARY dbvrep> PROCESS SETUP APPLY LOAD DICTIONARY dbvrep> PROCESS PREPARE_DP SETUP CLEAR dbvrep> PROCESS SETUP PAIR MINE AND APPLY Applier SCN set (start=579790, current=579790). dbvrep> SET APPLY.INSTANTIATE_SCN NOW Variable INSTANTIATE_SCN set to NOW for process APPLY. dbvrep> SET MINE._PREPARE_SUPLOG_TYPE PK Variable _PREPARE_SUPLOG_TYPE set to PK for process MINE. dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_UNCMP #Ignore tables created by Compression Advisor Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_CMP #Ignore tables created by Compression Advisor Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.SCHEDULER$_% #Ignore tables created by Oracle scheduler (also used by schema/full expdp/impdp) Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.CMP1$% #Ignore tables created by Compression Advisor since 11.2.0.4 Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.CMP2$% #Ignore tables created by Compression Advisor since 11.2.0.4 Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.CMP3$% #Ignore tables created by Compression Advisor since 11.2.0.4 Exclude rule created. dbvrep> EXCLUDE CREATE TABLE %.CMP4$% #Ignore tables created by Compression Advisor since 11.2.0.4 Exclude rule created. dbvrep> SET PREPARE_SCHEMA_EXCEPTIONS none Variable PREPARE_SCHEMA_EXCEPTIONS set to none for process *. dbvrep> PROCESS SUPPLEMENTAL LOGGING SCHEMA "REPOE" ENABLE PRIMARY KEY dbvrep> PROCESS SWITCH_REDOLOG Redo log switch requested.dbvrep> PROCESS WAIT_SCN_FLIP Waited 2 seconds until scn_to_timestamp changed. dbvrep> #single-scn instantiation: lock all tables and schemas dbvrep> PROCESS LOCK SCHEMAS "REPOE" Locking all schemas. ...locked 11 of 11 tables from REPOE schema. Lock done. dbvrep> #single-scn instantiation: unlock all tables and schemas, but forgetkeep the SCN (sodbvrep> itPROCESS doesLOCK notRELEASE affectLOCKS anydbvrep> furtherdbvrep> PREPARE#prepare statements)the dbvrep>tables PROCESS(we LOCKuse CLEAROFFLINE SCNas dbvrep>neither PROCESSMINE SWITCH_REDOLOGnor dbvrep>APPLY #prepareis scriptrunning; forwith instantiationOFFLINE dbvrep>we PROCESS PREPARE_DP WRITE DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE /u01/app/oracle/dbvrep_XE/APPLY.sh DBLINK ttorcl_src USERID SYSTEM/manager@target Created Data Pump script /u01/app/oracle/dbvrep_XE/APPLY.sh, using network import. dbvrep> create ddcdb from ddcfile DDC loaded into database (346 variables). dbvrep> set ON_WARNING SKIP Variable ON_WARNING set to SKIP for process *. dbvrep> set ON_ERROR SKIP Variable ON_ERROR set to SKIP for process *. OK-0: Completed successfully. |
At the end of the output, the Next Steps to be completed will be shown.
No Format |
---|
These steps are required after the dbvrep_XE-all.sh script runs:
1) Create the necessary directory(ies) on the servers:
target: /u01/app/oracle/dbvrep_XE
2) Copy the DDC files to the server(s) where the processes will run:
target: /u01/app/oracle/dbvrep_XE/dbvrep_XE-APPLY.ddc
source: /u01/app/oracle/dbvrep_XE/dbvrep_XE-MINE.ddc
3) Review that path to dbvrep executable is correct in the run scripts:
/u01/app/oracle/dbvrep_XE/dbvrep_XE-run-source.sh
/u01/app/oracle/dbvrep_XE/dbvrep_XE-run-target.sh
4) Copy the run script to the server(s) where the processes will run:
source: /u01/app/oracle/dbvrep_XE/dbvrep_XE-run-source.sh
target: /u01/app/oracle/dbvrep_XE/dbvrep_XE-run-target.sh
5) Ensure firewall is open for listen interfaces 0.0.0.0:7902, 0.0.0.0:7901 used by the processes.
6) Make sure the data on apply are in sync as of time when setup was run.
Scripts for Data Pump/export/DDL were created as requested:
/u01/app/oracle/dbvrep_XE/APPLY.sh
Create referenced database links (if any) before running the scripts.
7) Start the replication processes on all servers:
source: /u01/app/oracle/dbvrep_XE/dbvrep_XE-run-source.sh
target: /u01/app/oracle/dbvrep_XE/dbvrep_XE-run-target.sh
8) Start the console to monitor the progress:
/u01/app/oracle/dbvrep_XE/start-console.sh
The above list is stored in /u01/app/oracle/dbvrep_XE/Nextsteps.txt. |
Complete the Configuration
Follow the Next Steps instructions to complete the configuration.
On the target server, as oracle, create the /u01/app/oracle/dbvrep_XE directory.
No Format |
---|
mkdir /u01/app/oracle/dbvrep_XE |
6. On the source server, as oracle, copy the DDC file to the target server using scp. The oracle account password is oracle on both machines. The Dbvisit Database Configuration file contains all the configurational settings for the replication.
No Format |
---|
scp /u01/app/oracle/dbvrep_XE/dbvrep_XE-APPLY.ddc oracle@target:/u01/app/oracle/dbvrep_XE/dbvrep_XE-APPLY.ddc
The authenticity of host 'target (192.168.56.67)' can't be established.
RSA key fingerprint is 4b:6c:47:e5:ba:cd:45:5f:22:f3:b8:c7:5e:40:1f:27.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'target,192.168.56.67' (RSA) to the list of known hosts.
oracle@target's password:
dbvrep_XE-APPLY.ddc 100% 522 0.5KB/s 00:00 |
7. On the source server, as oracle, copy the dbvrep_XE-run-target.sh file to the target server using scp. The oracle account password is oracle on both machines.
No Format |
---|
scp /u01/app/oracle/dbvrep_XE/dbvrep_XE-run-target.sh oracle@target:/u01/app/oracle/dbvrep_XE/dbvrep_XE-run-target.sh oracle@target's password: dbvrep_XE-run-target.shwon't wait on network timeout) dbvrep> PREPARE OFFLINE SCHEMA "REPOE" Table REPOE.ADDRESSES instantiated at SCN 581609 Table REPOE.CARD_DETAILS instantiated at SCN 581609 Table REPOE.CUSTOMERS is special: has system-generated column names. Table REPOE.CUSTOMERS instantiated at SCN 581609 Column SYS_NC00017$ is special: virtual column. Excluding. Column SYS_NC00017$ is special: hidden column. Excluding. Column SYS_NC00017$ is special: system-generated column. Excluding. Column SYS_NC00017$ is special: virtual column. Excluding. Column SYS_NC00018$ is special: virtual column. Excluding. Column SYS_NC00018$ is special: hidden column. Excluding. Column SYS_NC00018$ is special: system-generated column. Excluding. Column SYS_NC00018$ is special: virtual column. Excluding. Table REPOE.INVENTORIES instantiated at SCN 581609 Table REPOE.LOGON instantiated at SCN 581609 Table REPOE.ORDERENTRY_METADATA instantiated at SCN 581609 Table REPOE.ORDERS instantiated at SCN 581609 Table REPOE.ORDER_ITEMS instantiated at SCN 581609 Table REPOE.PRODUCT_DESCRIPTIONS instantiated at SCN 581609 Table REPOE.PRODUCT_INFORMATION instantiated at SCN 581609 Table REPOE.WAREHOUSES instantiated at SCN 581609 dbvrep> dbvrep> #single-scn instantiation: unlock all tables and schemas, forget the SCN (so it does not affect any further PREPARE statements) dbvrep> PROCESS LOCK CLEAR SCN dbvrep> PROCESS SWITCH_REDOLOG Redo log switch requested.dbvrep> #prepare script for instantiation dbvrep> PROCESS PREPARE_DP WRITE DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE /u01/app/oracle/replicate/APPLY.sh DBLINK SOURCE USERID SYSTEM/manager@TARGET Created Data Pump script /u01/app/oracle/replicate/APPLY.sh, using network import. dbvrep> create ddcdb from ddcfile DDC loaded into database (399 variables). dbvrep> set ON_WARNING SKIP Variable ON_WARNING set to SKIP for process *. dbvrep> set ON_ERROR SKIP Variable ON_ERROR set to SKIP for process *. OK-0: Completed successfully. |
At the end of the output, the Next Steps to be completed will be shown.
No Format |
---|
These steps are required after the replicate-all.sh script runs:
1) Create the necessary directory(ies) on the servers:
target: /u01/app/oracle/replicate
2) Copy the DDC files to the server(s) where the processes will run:
target: /u01/app/oracle/replicate/replicate-APPLY.ddc
source: /u01/app/oracle/replicate/replicate-MINE.ddc
3) Review that path to dbvrep executable is correct in the run scripts:
/u01/app/oracle/replicate/replicate-run-source.sh
/u01/app/oracle/replicate/replicate-run-target.sh
4) Copy the run script to the server(s) where the processes will run:
source: /u01/app/oracle/replicate/replicate-run-source.sh
target: /u01/app/oracle/replicate/replicate-run-target.sh
5) Ensure firewall is open for listen interfaces 0.0.0.0:7902, 0.0.0.0:7901 used by the processes.
6) Make sure the data on apply are in sync as of time when setup was run.
Scripts for Data Pump/export/DDL were created as requested:
Create referenced database links (if any) before running the scripts.
/u01/app/oracle/replicate/APPLY.sh
7) Start the replication processes on all servers:
source: /u01/app/oracle/replicate/replicate-run-source.sh
target: /u01/app/oracle/replicate/replicate-run-target.sh
8) Start the console to monitor the progress:
/u01/app/oracle/replicate/start-console.sh
The above list is stored in /u01/app/oracle/replicate/Nextsteps.txt. |
Complete the Configuration
Follow the Next Steps instructions to complete the configuration.
On the target server, as oracle, create the /u01/app/oracle/replicate directory.
No Format |
---|
mkdir /u01/app/oracle/replicate |
6. On the source server, as oracle, copy the DDC file and run file to the target server using scp. The oracle account password is oracle on both machines. The Dbvisit Database Configuration file contains all the configurational settings for the replication.
No Format |
---|
[oracle@source replicate]$ scp replicate-APPLY.ddc replicate-run-target.sh oracle@target:/u01/app/oracle/replicate The authenticity of host 'target (192.168.56.67)' can't be established. RSA key fingerprint is 4b:6c:47:e5:ba:cd:45:5f:22:f3:b8:c7:5e:40:1f:27. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'target,192.168.56.67' (RSA) to the list of known hosts. oracle@target's password: replicate-APPLY.ddc 100% 525 0.5KB/s 00:00 replicate-run-target.sh 100% 108120 0.1KB/s 00:00 [oracle@source replicate]$ |
Note |
---|
The word "target" in dbvrep_orclreplicate-run-target.sh is dependent on your target hostname. In this case, the target host hostname is called target |
The replication is now ready to be instantiated by performing the initial load.