...
Section |
---|
Column |
---|
| Panel |
---|
| $ ./reptest1-all.sh Setting up Dbvisit Replicate configuration Configure database reptest1... This check fails if the DBID is not the expected one... Ok, check passed. Configure database database=dbvrep Object grants for database reptest1... Object grants for database database=dbvrep 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.4.21.2687 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /home/oracle/reptest1/reptest1-onetime.ddc loaded. MINE: Cannot determine Dbvisit Replicate dictionary version. (no dictionary exists) APPLY: Cannot determine Dbvisit Replicate dictionary version. (no dictionary exists) 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> ENGINE SWITCH_REDOLOG dbvrep> ENGINE SETUP MINE DROP DICTIONARY 0 dictionary objects dropped. dbvrep> ENGINE SETUP MINE CREATE DICTIONARY dbvrep> ENGINE SETUP MINE LOAD DICTIONARY 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> ENGINE SETUP APPLY DROP DICTIONARY 0 dictionary objects dropped. dbvrep> ENGINE SETUP APPLY CREATE DICTIONARY dbvrep> ENGINE SETUP APPLY LOAD DICTIONARY dbvrep> ENGINE SETUP PAIR MINE AND APPLY ID of mine proces is 09694DAE-9045-11E2-B3F5-D0118AF7C5BA. If not using DDC in database, set MINE_UNIQUE_ID to this value. 1 applier SCN set. dbvrep> SET APPLY.INSTANTIATE_SCN NOW Variable INSTANTIATE_SCN set to NOW for process APPLY. dbvrep> memory_set IGNORE_APPLY_DDL_DIFFERENCES YES Variable IGNORE_APPLY_DDL_DIFFERENCES set to YES for process *. dbvrep> ENGINE SUPPLEMENTAL LOGGING TABLE AVI.SAMPLE ENABLE PRIMARY KEY dbvrep> ENGINE SWITCH_REDOLOG dbvrep> ENGINE WAIT_SCN_FLIP Waited 3 seconds until scn_to_timestamp changed. dbvrep> #single-scn instantiation: lock all tables and schemas dbvrep> ENGINE LOCK TABLES AVI.SAMPLE Locking all tables. Lock done. dbvrep> #single-scn instantiation: unlock all tables and schemas, but keep the SCN dbvrep> ENGINE 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 TABLE AVI.SAMPLE NODDL RENAME TO reptest1.sample Table AVI.SAMPLE instantiated at SCN 36261160 dbvrep> #single-scn instantiation: unlock all tables and schemas, forget the SCN (so it does not affect any further PREPARE statements) dbvrep> ENGINE LOCK CLEAR SCN dbvrep> ENGINE SWITCH_REDOLOG dbvrep> #prepare script for instantiation dbvrep> ENGINE PREPARE_DP WRITE DDL_FILE FILE /home/oracle/reptest1/APPLY.sql USERID SYSTEM/odb10g@reptest1 Created DDL script /home/oracle/reptest1/APPLY.sql. dbvrep> create ddcdb from ddcfile DDC loaded into database (227 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. These steps are required after the reptest1-all.sh script runs:
1) Create the necessary directory(ies) on the servers: dbvldemo102: /home/oracle/reptest1 2) Copy the DDC files to the server(s) where the processes will run: dbvldemo102: /home/oracle/reptest1/reptest1-APPLY.ddc dbvldemo101: /home/oracle/reptest1/reptest1-MINE.ddc 3) Review that path to dbvrep executable is correct in the run scripts: /home/oracle/reptest1/reptest1-run-dbvldemo101.sh /home/oracle/reptest1/reptest1-run-dbvldemo102.sh 4) Copy the run script to the server(s) where the processes will run: /home/oracle/reptest1/reptest1-run-dbvldemo101.sh /home/oracle/reptest1/reptest1-run-dbvldemo102.sh 5) Ensure firewall is open for listen interfaces 0.0.0.0:7902, 0.0.0.0:7901 used by the processes. 6) Ensure firewall is open for remote access to mysql (usually port 3306) on dbvldemo102. 7) 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: /home/oracle/reptest1/APPLY.sql Create referenced database links (if any) before running the scripts. 8) Start the replication processes on all servers: /home/oracle/reptest1/reptest1-run-dbvldemo101.sh /home/oracle/reptest1/reptest1-run-dbvldemo102.sh 9) Start the console to monitor the progress: chmod 0750 /home/oracle/reptest1/start-console.sh /home/oracle/reptest1/start-console.sh The above list is stored in /home/oracle/reptest1/Nextsteps.txt. |
|
|
Start the replication process by running the orclCopy reptest1-APPLY.ddc and reptest1-run-dhcppc13dbvldemo102.sh script. This starts both the Mine and Apply process:to dbvldemo102 ans start MINE and APPLY on dbvldemo101 and dbvldemo102 respectively.
Starting MINE on dbvldemo101.
Section |
---|
Column |
---|
| Panel |
---|
| $oracle@dbvldemo101[/home/oracle/reptest1]: ./orclreptest1-run-dhcppc13dbvldemo101.sh sh Initializing......done OK-9056: Directory /home/oracle/orcl/ddc_backup set by variable DDC_BACKUP_DIR does not exist on this system. OK-9056: Directory /home/oracle/orcl/ddc_backup set by variable DDC_BACKUP_DIR does not exist on this system. DDC loaded from database (131 variables). Dbvisit ReplicateDDC loaded from database (227 variables). Dbvisit Replicate version 2.14.0421.10472687 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /home/oracle/orclreptest1/orclreptest1-APPLYMINE.ddc loaded. Starting process APPLYMINE...Created directory /home/oracle/orclreptest1/ddc_backup Created directory /home/oracle/orclreptest1/log/ Created directory /home/oracle/orclreptest1/log/trace/ Created directory /home/oracle/reptest1/orclmine/apply started Initializing started |
|
|
Starting APPLY on dbvldemo102.
Section |
---|
Column |
---|
| Panel |
---|
| oracle@dbvldemo102[/home/oracle/reptest1]: ./reptest1-run-dbvldemo102.sh Initializing......[oracle@dhcppc13 orcl]$ done DDC loaded from database (131227 variables). Dbvisit Replicate version 2.14.0421.10472687 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /home/oracle/orclreptest1/orclreptest1-MINEAPPLY.ddc loaded. Starting process MINEAPPLY...Created directory /home/oracle/orcl/mine/ startedreptest1/ddc_backup Created directory /home/oracle/reptest1/log/ Created directory /home/oracle/reptest1/log/trace/ Created directory /home/oracle/reptest1/apply started |
|
|
Dbvisit Replicate has now been configured and started in the background. The Dbvisit Replicate can be started in the foreground so that progress can be monitored:. To monitor replication progress start console on dbvldemo101 by executing start-console.sh script
Section |
---|
Column |
---|
| Panel |
---|
| $ /usr/local/dbvisit/binreplicate/dbvrep" --ddcfile /home/oracle/orclreptest1/orclreptest1-MINE.ddc Initializing.....done DDC loaded from database (134 variables). Dbvisit Replicate version 2.1.04.1047 Copyright (C) Dbvisit Software Limited. All rights reserved. -MINE IS running, initialization NOT yet complete. Currently at plog 264 and SCN 6355055 (08/12/2011 20:11:24). APPLY IS running, initialization NOT yet complete. Currently at plog 263 and SCN 6353874 (08/12/2011 20:11:20). DDC file /home/oracle/orcl/orcl.ddc loaded. Try "help" dbvrep> |
|
|
When Dbvisit Replicate is first configuredWhen Dbvisit Replicate is first configured, it needs to replicate its own internal tables and this is known as the initialization process. To monitor the progress of initialization, the LIST PROGRESS ALL command can be used.
Section |
---|
Column |
---|
| Panel |
---|
| dbvrep> list progress all Progress of replication: total/this execution ------------------------------------------------------------------------------------ DBVREP.DBRSCOL$/dbvrep.DBRSCOL$: 59% Mine:109211/109211 Applied:65363/65363 DBVREP.DBRSOBJ$: ---% Mine:78355/783 Applied:0/0 DBVREP.DBRSTAB$: ---% Mine:3516/3516 Applied:0/0 DBVREP.DBRSUSER$: ---% Mine:109/109 Applied:0/0 DBVREP.DBRSV_$DATABASE: ---% Mine:1/1 Applied:0/0 ------------------------------------------------------------------------------------ 5 tables listed. |
*Not all columns are displayed above. |
|
Replication cannot be started until the initialization has been completed. This is completed when the console show MINE and APPLY is running:
Section |
---|
Column |
---|
| Panel |
---|
| /MINE IS running. Currently at plog 269 and SCN 6365268 (08/12/2011 21:01:09). APPLY IS running. Currently at plog 269 and SCN 6365270 (08/12/2011 21:01:10). |
|
|
Insert records into the scott.avi_objects table. A script can be created to do this:
Section |
---|
Column |
---|
| Panel |
---|
| sqlplus scott/tiger@ttorcl<<SQL insert into scott.avi_objects select * from dba_objects where rownum <= 2000; commit; exit SQL |
|
|
On the Dbvisit Replicate console the replication can be monitored:
Section |
---|
Column |
---|
| Panel |
---|
| Progress of replication: total/this execution ------------------------------------------------------------------------------------ SCOTT.AVI_OBJECTS/scott.avi_objects:100% Mine:2000/2000 Applied:2000/2000 ------------------------------------------------------------------------------------ 1 tables listed. dbvrep> |
*not all columns are displayed above. |
|
If the replication shows 100%, then it is fully replicated. If the progress is not shown on the command console then LIST PROGRESS can be used to display the progress.
The insert script can be repeatedly run to insert more records which are then automatically replicated to the MySQL database.
The Mine and Apply processes are run in the background and can be viewed with ps
...
...
...
...
Replication cannot be started until the initialization has been completed. This is completed when the console show MINE and APPLY is running:
Now, all insert, update and delete operation on avi.sample table of Oracle will be replicated to reptest1.sample table of MySQL