We're here to help!

Final Wrap-up

Follow

Final wrap-up

All the information about the replication process has been obtained and now the replication environment can be created.

 

The Dbvisit Replicate wizard has completed and has created the necessary replication environment.
Exit out of dbvrep and run the *-all.sh or *all.bat script created by the wizard. If you chose the 'no lock' option for data instantiation during the Step 2 of the Setup Wizard there will be an additional script called *pre-all.sh. In the above example the script is called orcl-pre-all.sh. This script will turn on supplemental logging on the database as well as turn on table level supplemental logging. The *-pre-all.sh script should be run at a time when the database is not as active as supplemental logging will require a lock on those tables.

In the above example the script is called orcl-all.sh. This script can be run at any time to reset or recreate the replication environment. The Nextsteps.txt explains the next steps to initiate the replication.
This completes the Dbvisit Replicate setup and configuration.
Before running the script, review the created scripts as indicated by the Nextsteps.txt (shown at the end of all.* script). For example:

  • Review the location of dbvrep(.exe) if it differs among the nodes if RAC is used.
  • Check TNS_ADMIN and ORACLE_HOME paths and make sure they are correct on all the different servers involved.

After testing, consider adding the starting of dbvrep processes to init scripts on Linux/Unix to automatically start them on server reboot. (This is not needed on Windows, as processes are registered as services by default).

Outcome of running the scripts created by the setup wizard.

Running the *-all.sh script will configure and initiate the replication. It does the following:

  • Create the Dbvisit Replicate schemas in the source and target databases (default username dbvrep)
  • Grant the necessary privileges to the Dbvisit Replicate schema.
  • Create the Dbvisit Replicate repository in the source and target databases.
  • Load the Dbvisit Replicate configuration file (DDC) into the Dbvisit Replicate repository. The DDC file is like the init.ora for Oracle and contains the settings for the replication.
  • Prepare the schemas or objects for replication.

Example of running the sample-all.sh

oracle@dbvlin71[sample]: ./sample-all.sh

Setting up Dbvisit Replicate configuration

Configure database orcl_src...
This check fails if the DBID is not the expected one...

Ok, check passed.

Configure database orcl_tgt...
This check fails if the DBID is not the expected one...

Ok, check passed.
Object grants for database orcl_src...
Object grants for database orcl_tgt...

Setting up the configuration
Initializing......done
DDC loaded from database (0 variables).
Dbvisit Replicate version 2.8
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/oracle/sample/config/sample-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> # Configuring default processes
dbvrep> choose process MINE
Process type MINE set to: MINE.
dbvrep> choose process APPLY
Process type APPLY set to: APPLY.
dbvrep> PROCESS SWITCH_REDOLOG
Redo log switch requested.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: 148315250 (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=148315271, current=148315271).
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 "SCOTT" ENABLE PRIMARY KEY
dbvrep> PROCESS SWITCH_REDOLOG
Redo log switch requested.dbvrep> PROCESS WAIT_SCN_FLIP
Waited 5 seconds until scn_to_timestamp changed.
dbvrep> #single-scn instantiation: lock all tables and schemas
dbvrep> PROCESS LOCK SCHEMAS "SCOTT"

Locking all schemas.
...locked 9 of 9 tables from SCOTT schema.
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 nor APPLY
is running; with OFFLINE we won't wait on network timeout)
dbvrep> PREPARE OFFLINE SCHEMA "SCOTT"
Table SCOTT. space here instantiated at SCN 148319663
Table SCOTT.BIG_TABLE2 instantiated at SCN 148319663
Table SCOTT.BONUS instantiated at SCN 148319663
Table SCOTT.DEPT instantiated at SCN 148319663
Table SCOTT.EMP instantiated at SCN 148319663
Table SCOTT.SALES instantiated at SCN 148319663
Table SCOTT.SALES2 instantiated at SCN 148319663
Table SCOTT.SALGRADE instantiated at SCN 148319663
Table SCOTT.SSS instantiated at SCN 148319663
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 LOAD_REQUEST OFFLINE SCHEMA "SCOTT" AT INSTANTIATE SCN
Table SCOTT. space here will be loaded using SCN 148319663.
Table SCOTT.BIG_TABLE2 will be loaded using SCN 148319663.
Table SCOTT.BONUS will be loaded using SCN 148319663.
Table SCOTT.DEPT will be loaded using SCN 148319663.
Table SCOTT.EMP will be loaded using SCN 148319663.
Table SCOTT.SALES will be loaded using SCN 148319663.
Table SCOTT.SALES2 will be loaded using SCN 148319663.
Table SCOTT.SALGRADE will be loaded using SCN 148319663.
Table SCOTT.SSS will be loaded using SCN 148319663.
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.
WARN-1850: No DDC DB available, dictionary table does not exist.

These steps are required after the sample-all.sh script runs:
1) Create the necessary directory(ies) on the servers:
dbvlin72.dbvisit: /home/oracle/sample

2) Copy the DDC files to the server(s) where the processes will run:
dbvlin72.dbvisit: /home/oracle/sample/sample-APPLY.ddc
dbvlin71.dbvisit: /home/oracle/sample/sample-MINE.ddc

3) Review that path to dbvrep executable is correct in the run scripts:
/home/oracle/sample/sample-run-dbvlin71.dbvisit.sh
/home/oracle/sample/sample-run-dbvlin72.dbvisit.sh

4) Copy the run script to the server(s) where the processes will run:
dbvlin71.dbvisit: /home/oracle/sample/sample-run-dbvlin71.dbvisit.sh
dbvlin72.dbvisit: /home/oracle/sample/sample-run-dbvlin72.dbvisit.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:
dbvlin71.dbvisit: /home/oracle/sample/sample-run-dbvlin71.dbvisit.sh
dbvlin72.dbvisit: /home/oracle/sample/sample-run-dbvlin72.dbvisit.sh

8) Start the console to monitor the progress:
/home/oracle/sample/start-console.sh

The above list is stored in /home/oracle/sample/Nextsteps.txt.

oracle@dbvlin71[sample]:
  • If you are on 12c and during the running of the *all.sh script you get the message:
    WARN-1258: Insufficient privileges to do a redolog switch. Please issue it manually:  Alter system switch logfile;
    That is normally as you don't have privileges for a system wide redo log switch. 

     

By following the steps listed in Next Steps you will end up with the MINE process running on the source server and the APPLY process running on the target server.  You can see the status of replication by running the console

oracle@dbvlin71[sample]: ./start-console.sh


| Dbvisit Replicate 2.8 (MAX edition) - Evaluation License expires in 29 days
MINE IS running. Currently at plog 345 and SCN 7782366 (06/01/2016 07:00:26).
APPLY IS running. Currently at plog 345 and SCN 7782354 (06/01/2016 07:00:24).
Progress of replication repoe_mysql:MINE->APPLY: total/this execution
--------------------------------------------------------------------------------------------------------------------------------------------
SCOTT.EMP:                    100%  Mine:660791/660791   Unrecov:0/0         Applied:660791/660791 Conflicts:0/0     Last:01/06/2016 22:46:37/OK
SCOTT.DEPT:                   100%  Mine:923685/923685   Unrecov:0/0         Applied:923685/923685 Conflicts:0/0     Last:01/06/2016 22:23:08/OK

--------------------------------------------------------------------------------------------------------------------------------------------
2 tables listed.
Have more questions? Submit a request

Comments