We're here to help!

Back to Basics With Dbvisit Replicate VI

Follow

DbvisitReplicate_FinishLine.jpg

We are near the end of our journey.  In parts 1-5 (Part I, Part II, Part III, Part IV, Part V) we ran through the complete setup wizard.  In Part V we completed the setup wizard and are now ready to take the final steps to get replication up and running.  We will start by looking at the files that are now in your replication directory.  This is the directory that you had the setup wizard create earlier.

oracle@dbvlintest[/home/oracle/DEMO]: ls
config  DEMO-all.sh  DEMO-APPLY.ddc  DEMO-MINE.ddc  
DEMO-run-dbvlintest.dbvisit.co.nz.sh  
DEMO-run-dbvlintesttarget.dbvisit.co.nz.sh  log  
Nextsteps.txt  start-console.sh
oracle@dbvlintest[/home/oracle/DEMO]:

The important files to look at now are in the config directory:

oracle@dbvlintest[/home/oracle/DEMO/config]: ls
DEMO-dbsetup_pre_SDB11.sql  DEMO-dbsetup_TDB11.sql  
DEMO-grants_TDB11.sql  DEMO-pre-suplog_SDB11.sql  
DEMO-wizard-databases.cfg  DEMO-wizard-pairs.cfg
DEMO-dbsetup_SDB11.sql  DEMO-grants_SDB11.sql   
DEMO-onetime.ddc DEMO-setup.dbvrep 
DEMO-wizard-ddc.cfg  DEMO-wizard-tables.cfg
oracle@dbvlintest[/home/oracle/DEMO/config]:

This directory contains all of the configuration files.  The cfg files contain all of the answers that were the input from the setup wizard.  The sql files will be called from the ‘master script’ also know as the ‘all script’ . In our example you will see files and scripts with the word DEMO as that is what we input in the setup wizard.  This is why it is important to give it a relevant name. You will also find a log directory which of course is where Dbvisit Replicate logs are kept.  It is worthwhile to look at this directory later.  Also support may ask you for files from that directory. The DEMO directory also contains two DDC files.  DDC stands for Dbvisit Database Configuration.  There will be one file for the MINE process and one for the APPLY process.  You can think of the DDC files as your parameter files for MINE and APPLY.  You will also find two ‘DEMO-run’ files.  One script will start the MINE and one will start the APPLY.   There is also a start-console script to start the console.  There is a text file called Nextsteps.txt.  We will cover these files in a moment.  Lastly there is the ‘all’ script that was mentioned previous.  This all script will make a call to the configuration scripts in the config directory.  You could, in theory, run these scripts one at a time but the all script will make your life easier.  Running the all script is the next step in setting up replication.  Remember the setup wizard makes no changes to the database.  So we will know run the all.sh script.  This may take some time depending on which options you used to get the initial starting point and  how busy the application is.

oracle@dbvlintest[/home/oracle/DEMO]: ./DEMO-all.sh
Setting up Dbvisit Replicate configuration
Configure database SDB11...
This check fails if the DBID is not the expected one...
Ok, check passed.
Configure database TDB11...
This check fails if the DBID is not the expected one...

Ok, check passed. 
Object grants for database SDB11... 
Object grants for database TDB11... 
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.7. 
(C) Dbvisit Software Limited. All rights reserved. 
DDC file /home/oracle/DEMO/config/DEMO-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> PROCESS SWITCH_REDOLOG 
dbvrep> PROCESS SETUP MINE DROP DICTIONARY 
0 dictionary objects dropped. 
dbvrep> PROCESS SETUP MINE CREATE DICTIONARY 
dbvrep> PROCESS SETUP MINE LOAD DICTIONARY 
Oldest active transaction SCN: 30017536 (no active transaction) 
Supplemental logging on database set. 
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=30017564, current=30017564). 
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> memory_set IGNORE_APPLY_DDL_DIFFERENCES YES 
Variable IGNORE_APPLY_DDL_DIFFERENCES set to YES for process *. 
dbvrep> SET PREPARE_SCHEMA_EXCEPTIONS SCOTT.EMP 
Variable PREPARE_SCHEMA_EXCEPTIONS set to SCOTT.EMP for process *. 
dbvrep> PROCESS SUPPLEMENTAL LOGGING SCHEMA "SCOTT" ENABLE PRIMARY 
KEY 
dbvrep> PROCESS SWITCH_REDOLOG 
dbvrep> PROCESS WAIT_SCN_FLIP 
Waited 1 seconds until scn_to_timestamp changed. 
dbvrep> #single-scn instantiation: lock all tables and schemas 
dbvrep> PROCESS LOCK SCHEMAS "SCOTT" 
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 "SCOTT" 
Table SCOTT. space here instantiated at SCN 30021324 
Table SCOTT.BIG_TABLE2 instantiated at SCN 30021324 
Table SCOTT.BONUS instantiated at SCN 30021324 
Table SCOTT.DEPT instantiated at SCN 30021324 
Table SCOTT.DEPT3 instantiated at SCN 30021324 
Table SCOTT.DEPT4 instantiated at SCN 30021324 
Table SCOTT.EMP excluded, as requested by PREPARE_SCHEMA_EXCEPTIONS. 
Table SCOTT.SALGRADE instantiated at SCN 30021324 
Table SCOTT.TEST_TRUN instantiated at SCN 30021324 
Table SCOTT.lower instantiated at SCN 30021324 
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 
dbvrep> #prepare script for instantiation 
dbvrep> DDL DROP REPLICATE "SCOTT" 
WARN-1924: The specified table SCOTT.EMP (id=87108) was not prepared at 
APPLY; no apply settings will be considered to tailor the SQL. 
dbvrep> DDL CREATE_FROM_DICT REPLICATE "SCOTT" 
WARN-1924: The specified table SCOTT.EMP (id=87108) was not prepared at 
APPLY; no apply settings will be considered to tailor the SQL. 
dbvrep> PROCESS LOAD_REQUEST SCHEMA "SCOTT" AT INSTANTIATE SCN 
Table SCOTT. space here will be loaded using SCN 30021324. 
Table SCOTT.BIG_TABLE2 will be loaded using SCN 30021324. 
Table SCOTT.BONUS will be loaded using SCN 30021324. 
Table SCOTT.DEPT will be loaded using SCN 30021324. 
Table SCOTT.DEPT3 will be loaded using SCN 30021324. 
Table SCOTT.DEPT4 will be loaded using SCN 30021324. 
WARN-9447: Table SCOTT.EMP (id=87108) not prepared, skipping. 
Table SCOTT.SALGRADE will be loaded using SCN 30021324. 
Table SCOTT.TEST_TRUN will be loaded using SCN 30021324. 
Table SCOTT.lower will be loaded using SCN 30021324. 
dbvrep> create ddcdb from ddcfile 
DDC loaded into database (358 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, but some operation(s) raised warnings and/or errors. 
Some apply tables were (re)created by the .dbvrep script; 
now we run the grant scripts again. 
Object grants for database SDB11... 
Object grants for database TDB11... 

These steps are required after the DEMO-all.sh script runs:

1) Create the necessary directory(ies) on the servers:
dbvlintarget.dbvisit.co.nz: /home/oracle/DEMO
2) Copy the DDC files to the server(s) where the processes will run:
dbvlintarget.dbvisit.co.nz: /home/oracle/DEMO/DEMO-APPLY.ddc
dbvlintest.dbvisit.co.nz: /home/oracle/DEMO/DEMO-MINE.ddc
3) Review that path to dbvrep executable is correct in the run scripts:
/home/oracle/DEMO/DEMO-run-dbvlintest.dbvisit.co.nz.sh
/home/oracle/DEMO/DEMO-run-dbvlintarget.dbvisit.co.nz.sh
4) Copy the run script to the server(s) where the processes will run:
dbvlintest.dbvisit.co.nz: /home/oracle/DEMO/DEMO-run-dbvlintest.
dbvisit.co.nz.shdbvlintarget.dbvisit.co.nz: /home/oracle/DEMO/
DEMO-run-dbvlintarget.dbvisit.co.nz.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.
7) Start the replication processes on all servers:
dbvlintest.dbvisit.co.nz: /home/oracle/DEMO/DEMO-run-dbvlintest.
dbvisit.co.nz.sh
dbvlintarget.dbvisit.co.nz: /home/oracle/DEMO/DEMO-run-dbvlintarget.
dbvisit.co.nz.sh
8) Start the console to monitor the progress:
/home/oracle/DEMO/start-console.sh
The above list is stored in /home/oracle/DEMO/Nextsteps.txt.

The last line now tells you what to do.  Look in the Nextsteps.txt and it will give use the instructions on how to finish replication. Step 1. This is nice and easy and we will log onto the target server and make sure that the DEMO folder exists. Step 2. Is needed to copy the APPLY.ddc file over to the target server.  MINE will run on the source server so we don’t have to worry about that one.  So FTP the ddc file over to the target server in the DEMO directory that you created in Step 1. Step 3. Will ensure that the the ‘run’ scripts are pointing to the correct executable paths.  You will need to ensure this on both the source and target and make sure that the two run scripts are appropriate for each. Step 4. This  is similar to step 2.  We need to copy the APPLY run script to the target server.  FTP that over to the DEMO directory. Step 5.  If you are using the default ports of 7901 and 7902, make sure that they are open between the source and target servers.  If you use non default ports (configurable in Step 4 of the setup wizard) those ports would show up here. Step 6.  Depending on the initial data load method you chose you may have to do nothing here or you may need to do your export/import etc Step 7.   Here is where you will run the two run scripts.  These run scripts will start the MINE/APPLY process so that they start running. Step 8 . Starts the Dbvisit Replicate console so that you can ‘see’ the replication and make sure that the data is flowing. After following those 8 steps your replication will be up and running.  There really is nothing left to do but sit back and enjoy the data flow.

Have more questions? Submit a request

Comments