Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Active - Active or 2-way replication is very similar to 1-way replication. This is used when changes can be made to both databases and they both must be kept in sync. 

...

No Format
bgColorCCC
Step 4 - Process configuration
========================================
The fourth step is to configure the replication processes for each replication. Although most options have reasonable defaults,
manual input is required.
Following processes are defined:
1: MINE on reptest1
 Not configured.
2: APPLY on reptest2
 Not configured.
3: MINE1 on reptest2
 Not configured.
4: APPLY1 on reptest1
 Not configured.
Enter number of process to modify it, or "done": [1] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [dbvldemo101] 
Server type (Windows/Linux/Unix): [Linux] 
Enable email notifications about problems (yes/no)? [YESNO] n 
Enable SNMP traps/notifications about problems (yes/no)? [NO] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/oracle/reptest1]
Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[MINE_REMOTE_INTERFACE]: Network remote interface: dbvldemo101:7901 
[MINE_DATABASE]: Database TNS: reptest1 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin 
[MINE_USER]: Dbvisit Replicate database username: dbvrep 
[MINE_PASSWORD]: Dbvisit Replicate database password: ********* 
[MINE_PLOG]: Filemask for generated plogs: /home/oracle/reptest1/mine/%S.%E (%S is sequence, %T thread, %F original filename
(stripped extension), %P process type, %N process name, %E default extension)
[LOG_FILE]: General log file: /home/oracle/reptest1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/oracle/reptest1/log/trace/dbvrep_%N_%D_%I_%U.%E
Checking that these settings are valid...
Do you want change any of the settings? [no]
Following processes are defined:
1: MINE on reptest1
 Host: dbvldemo101, SMTP: NO, SNMP: NO
2: APPLY on reptest2
 Not configured.
3: MINE1 on reptest2
 Not configured.
4: APPLY1 on reptest1
 Not configured.
Enter number of process to modify it, or "done": [2] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [dbvldemo102] 
Server type (Windows/Linux/Unix): [Linux] 
Enable email notifications about problems (yes/no)? [YESNO] n 
Enable SNMP traps/notifications about problems (yes/no)? [NO] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/oracle/reptest1]
Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[APPLY_REMOTE_INTERFACE]: Network remote interface: dbvldemo102:7902 
[APPLY_DATABASE]: Database TNS: reptest2 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin 
[APPLY_USER]: Dbvisit Replicate database username: dbvrep 
[APPLY_PASSWORD]: Dbvisit Replicate database password: ********* 
[APPLY_STAGING_DIR]: Directory for received plogs: /home/oracle/reptest1/apply 
[LOG_FILE]: General log file: /home/oracle/reptest1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/oracle/reptest1/log/trace/dbvrep_%N_%D_%I_%U.%E
Checking that these settings are valid...
Do you want change any of the settings? [no]
Following processes are defined:
1: MINE on reptest1
 Host: dbvldemo101, SMTP: NO, SNMP: NO
2: APPLY on reptest2
 Host: dbvldemo102, SMTP: NO, SNMP: NO
3: MINE1 on reptest2
 Not configured.
4: APPLY1 on reptest1
 Not configured.
Enter number of process to modify it, or "done": [3] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [dbvldemo102] 
Server type (Windows/Linux/Unix): [Linux] 
Enable email notifications about problems (yes/no)? [YESNO] n 
Enable SNMP traps/notifications about problems (yes/no)? [NO] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/oracle/reptest1]
Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[MINE_REMOTE_INTERFACE]: Network remote interface: dbvldemo102:7903 
[MINE_DATABASE]: Database TNS: reptest2 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin 
[MINE_USER]: Dbvisit Replicate database username: dbvrep 
[MINE_PASSWORD]: Dbvisit Replicate database password: ********* 
[MINE_PLOG]: Filemask for generated plogs: /home/oracle/reptest1/mine1/%S.%E (%S is sequence, %T thread, %F original filename
(stripped extension), %P process type, %N process name, %E default extension)
[LOG_FILE]: General log file: /home/oracle/reptest1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/oracle/reptest1/log/trace/dbvrep_%N_%D_%I_%U.%E
Checking that these settings are valid...
Do you want change any of the settings? [no]
Following processes are defined:
1: MINE on reptest1
 Host: dbvldemo101, SMTP: NO, SNMP: NO
2: APPLY on reptest2
 Host: dbvldemo102, SMTP: NO, SNMP: NO
3: MINE1 on reptest2
 Host: dbvldemo102, SMTP: NO, SNMP: NO
4: APPLY1 on reptest1
 Not configured.
Enter number of process to modify it, or "done": [4] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [dbvldemo101] 
Server type (Windows/Linux/Unix): [Linux] 
Enable email notifications about problems (yes/no)? [YESNO] n 
Enable SNMP traps/notifications about problems (yes/no)? [NO] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/oracle/reptest1]
Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[APPLY_REMOTE_INTERFACE]: Network remote interface: dbvldemo101:7904 
[APPLY_DATABASE]: Database TNS: reptest1 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin 
[APPLY_USER]: Dbvisit Replicate database username: dbvrep 
[APPLY_PASSWORD]: Dbvisit Replicate database password: ********* 
[APPLY_STAGING_DIR]: Directory for received plogs: /home/oracle/reptest1/apply1 
[LOG_FILE]: General log file: /home/oracle/reptest1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/oracle/reptest1/log/trace/dbvrep_%N_%D_%I_%U.%E
Checking that these settings are valid...
Do you want change any of the settings? [no]
Following processes are defined:
1: MINE on reptest1
 Host: dbvldemo101, SMTP: NO, SNMP: NO
2: APPLY on reptest2
 Host: dbvldemo102, SMTP: NO, SNMP: NO
3: MINE1 on reptest2
 Host: dbvldemo102, SMTP: NO, SNMP: NO
4: APPLY1 on reptest1
 Host: dbvldemo101, SMTP: NO, SNMP: NO
Enter number of process to modify it, or "done": [done]

...

No Format
bgColorCCC
oracle@dbvldemo101[/home/oracle/reptest1]: ./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 reptest2...
This check fails if the DBID is not the expected one...

Ok, check passed.
Object grants for database reptest1...
Object grants for database reptest2...
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.4x.31x.3038x
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 PREPARE_DP SETUP CLEAR
dbvrep> ENGINE SETUP PAIR MINE AND APPLY
ID of mine proces is F8908CFE-F408-11E2-ABE7-37F589F7C5BA. 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> ENGINE SUPPLEMENTAL LOGGING SCHEMA TEST1 ENABLE PRIMARY KEY
dbvrep> ENGINE SUPPLEMENTAL LOGGING TABLE AVI.EMP 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.EMP
Locking all tables.
Lock done.
dbvrep> ENGINE LOCK SCHEMAS TEST1
Locking all schemas.
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 SCHEMA TEST1
Table TEST1.DEPT instantiated at SCN 7849244
Table TEST1.EMP instantiated at SCN 7849244
dbvrep> PREPARE OFFLINE TABLE AVI.EMP
Table AVI.EMP instantiated at SCN 7849244
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 DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE /home/oracle/reptest1/APPLY.sh DBLINK reptest1 USERID
SYSTEM/odb10g@reptest2password@reptest2
Created Data Pump script /home/oracle/reptest1/APPLY.sh, using network import.
dbvrep> 
dbvrep> # Configuring non-default processes
dbvrep> choose process MINE1
Process type MINE set to: MINE1.
dbvrep> choose process APPLY1
Process type APPLY set to: APPLY1.
dbvrep> ENGINE SWITCH_REDOLOG
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 LOAD DICTIONARY
dbvrep> ENGINE PREPARE_DP SETUP CLEAR
dbvrep> ENGINE SETUP PAIR MINE AND APPLY
ID of mine proces is 0695067C-F409-11E2-ABE7-37F589F7C5BA. If not using DDC in database, set MINE_UNIQUE_ID to this value.
1 applier SCN set.
dbvrep> SET APPLY1.INSTANTIATE_SCN NOW
Variable INSTANTIATE_SCN set to NOW for process APPLY1.
dbvrep> ENGINE SUPPLEMENTAL LOGGING SCHEMA TEST1 ENABLE PRIMARY KEY
dbvrep> ENGINE SUPPLEMENTAL LOGGING TABLE AVI.EMP ENABLE PRIMARY KEY
dbvrep> ENGINE SWITCH_REDOLOG
dbvrep> ENGINE WAIT_SCN_FLIP
Waited 2 seconds until scn_to_timestamp changed.
dbvrep> #single-scn instantiation: lock all tables and schemas
dbvrep> ENGINE LOCK TABLES AVI.EMP
Locking all tables.
Lock done.
dbvrep> ENGINE LOCK SCHEMAS TEST1
Locking all schemas.
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 SCHEMA TEST1
Table TEST1.DEPT instantiated at SCN 7830009
Table TEST1.EMP instantiated at SCN 7830009
dbvrep> PREPARE OFFLINE TABLE AVI.EMP
Table AVI.EMP instantiated at SCN 7830009
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 DP_NETWORKLINK DIRECTORY DATA_PUMP_DIR FILE /home/oracle/reptest1/APPLY1.sh DBLINK reptest2
USERID SYSTEM/odb10g@reptest1password@reptest1
Created Data Pump script /home/oracle/reptest1/APPLY1.sh, using network import.
dbvrep> create ddcdb from ddcfile
DDC loaded into database (291 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.
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-APPLY1.ddc
dbvldemo101: /home/oracle/reptest1/reptest1-MINE.ddc
dbvldemo102: /home/oracle/reptest1/reptest1-MINE1.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:7904, 0.0.0.0:7901, 0.0.0.0:7903 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:
/home/oracle/reptest1/APPLY.sh
/home/oracle/reptest1/APPLY1.sh
Create referenced database links (if any) before running the scripts.
7) Start the replication processes on all servers:
/home/oracle/reptest1/reptest1-run-dbvldemo101.sh
/home/oracle/reptest1/reptest1-run-dbvldemo102.sh
8) Start the console to monitor the progress:
/home/oracle/reptest1/start-console.sh
The above list is stored in /home/oracle/reptest1/Nextsteps.txt.

...

.

** The above steps are very important to follow one by one. This includes copying of files the wizard created to the target host.

Running scripts from Step #6 is necessary as well.

Start replication by running the scripts reptest1-run-dbvldemo101.sh and reptest1-run-dbvldemo102.sh) has commands to start both a MINE and APPLY on each server.

...

With 2-way replication the table listing in the console can so long that the prompt cannot be seen. By default, 30 tables are listed for each replication, thus for a 2-way replication, it takes up to 70 screen lines.
To change this, edit the *-MINE.ddc file and add line "set STATUS_BAR_ACTIVE_TABLES 5". Or enter this command at the console prompt. Restart the console for this change to take affect.