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.
...
Note |
---|
Click here for prerequisite checklist. |
Server/Database | Name |
---|---|
Source database | reptest1 |
Source server | dbvldemo101 |
Target database | reptest2 |
Target server | dbvldemo102 |
TNS alias for source database: | reptest1 |
TNS alias for target database | reptest2 |
Throughout the wizard, defaults are shown in [brackets]. Just press enter to accept them. The replication name in this example is "reptest1".
...
No Format | ||
---|---|---|
| ||
Step 2 - Replication pairs ======================================== The second step is to set source and targets for each replication pair. Let's configure the replication pair, selecting source and target. Following databases are described: 1: reptest1 (Oracle) 2: reptest2 (Oracle) Select source database: [1] Select target database: [2] Will be DDL replication enabled? [yes] no Use fetcher to offload the mining to a different server? (yes/no) [no] Would you like to encrypt the data across the network (yes or no) [no] Would you like to compress the data across the network (yes or no) [no] How long do you want to set the network timeouts. Recommended range between 60-300 seconds [60] Lock and copy the data initially one-by-one or at a single SCN? one-by-one : Lock tables one by one and capture SCN single-scn : One SCN for all tables ddl-only : Only DDL script for target objects resetlogs : Use SCN from last resetlogs operation (standby activation, rman incomplete recovery) (one-by-one/single-scn/ddl-only/resetlogs) [single-scn] What data instantiation script to create? dp_networklink : Data Pump with network link. No export datafile is created (APPLY.sh) dp_exp : Data Pump with export datafile. Creates an export datafile (APPLY.sh) exp : Pre-datapump exp/imp with export datafile (APPLY.sh) ddl_file : DDL file created (APPLY.sql) ddl_run : DDL is automatically executed on target load : All replicated data is created and loaded automatically none (dp_networklink/dp_exp/exp/ddl_file/ddl_run/load/none) [dp_networklink] Following replication pairs are now configured: 1: reptest1 (Oracle) ==> reptest2 (Oracle), DDL: no, fetcher: no, process suffix: (no suffix), compression: no, encryption: no, network timeout: 60, prepare type: single-scn, data load: dp_networklink Enter number of replication pair to modify it, or "add", or "done": [done] Â Â |
Add another replication pair, by typing "add" instead of "done". Choose the reverse source and target database:
No Format | ||
---|---|---|
| ||
Enter number of replication pair to modify it, or "add", or "done": [done] add  Let's configure the replication pair, selecting source and target. Following databases are described: 1: reptest1 (Oracle) 2: reptest2 (Oracle) Select source database: [1] 2 Select target database: [2] 1 Will be DDL replication enabled? [yes] no Use fetcher to offload the mining to a different server? (yes/no) [no] Would you like to encrypt the data across the network (yes or no) [no] Would you like to compress the data across the network (yes or no) [no] How long do you want to set the network timeouts. Recommended range between 60-300 seconds [60] Lock and copy the data initially one-by-one or at a single SCN? one-by-one : Lock tables one by one and capture SCN single-scn : One SCN for all tables ddl-only : Only DDL script for target objects resetlogs : Use SCN from last resetlogs operation (standby activation, rman incomplete recovery) (one-by-one/single-scn/ddl-only/resetlogs) [single-scn] What data instantiation script to create? dp_networklink : Data Pump with network link. No export datafile is created (APPLY.sh) dp_exp : Data Pump with export datafile. Creates an export datafile (APPLY.sh) exp : Pre-datapump exp/imp with export datafile (APPLY.sh) ddl_file : DDL file created (APPLY.sql) ddl_run : DDL is automatically executed on target load : All replicated data is created and loaded automatically none (dp_networklink/dp_exp/exp/ddl_file/ddl_run/load/none) [dp_networklink] Following replication pairs are now configured: 1: reptest1 (Oracle) ==> reptest2 (Oracle), DDL: no, fetcher: no, process suffix: (no suffix), compression: no, encryption: no, network timeout: 60, prepare type: single-scn, data load: dp_networklink 2: reptest2 (Oracle) ==> reptest1 (Oracle), DDL: no, fetcher: no, process suffix: (no suffix), compression: no, encryption: no, network timeout: 60, prepare type: single-scn, data load: dp_networklink Enter number of replication pair to modify it, or "add", or "done": [done]  |
Two replication pairs are now configured.
...
For each replication pair, the objects to be replicated have to specified. This can be the same or different for each replication pair.
No Format | ||
---|---|---|
| ||
 Step 3 - Replicated tables ======================================== The third step is to choose the schemas and tables to be replicated. If the databases are reachable,the tables are checked for existence, datatype support, etc., schemas are queried for tables. Note that all messages are merely hints/warnings and may be ignored if issues are rectified before the scripts are actually executed. Following tables are defined for replication pairs: 1:reptest1 (Oracle) ==> reptest2 (Oracle), DDL: yes, suffix: (no suffix), prepare: single-scn No tables defined. 2:reptest2 (Oracle) ==> reptest1 (Oracle), DDL: yes, suffix: 1, prepare: single-scn No tables defined. Enter number of replication pair to modify it, or "done": [1] Please enter list of all individual tables to be replicated. Enter schema name(s) only to replicate all tables in that schema. Use comma or space to delimit the entries. Enter the tables and schemas: [] AVI Selected schemas: AVI Add more tables or schemas? (YES/NO) [NO] To replicate changes of PL/SQL objects in schema(s), please enter the schemas to be replicated. Note that specifying any entry will cause additional privileges to be granted to dbvrep. Enter through a comma or space-delimited list. Enter the list of schemas (PL/SQL): [] You can also specify some advanced options: 1. Rename schemas or tables. 2. Specify filtering conditions. 3. (Tables only) Configure Change Data Capture; this does not maintain a copy of the source table, but logs all operations as separate entries. This is useful for ETL or as an audit trail. This usually requires adding of new columns (timestamps, old/new values etc.) to the target table. Specify rename name or filter condition for any of the specified schemas (YES/NO): [no] Following tables are defined for replication pairs: 1: reptest1 (Oracle) ==> reptest2 (Oracle), DDL: no, suffix: (no suffix), prepare: single-scn AVI(tables) 2: reptest2 (Oracle) ==> reptest1 (Oracle), DDL: no, suffix: (no suffix), prepare: single-scn No tables defined. Enter number of replication pair to modify it, or "done": [2] Please enter list of all individual tables to be replicated. Enter schema name(s) only to replicate all tables in that schema. Use comma or space to delimit the entries. Enter the tables and schemas: [] AVI Selected schemas: AVI Add more tables or schemas? (YES/NO) [NO] To replicate changes of PL/SQL objects in schema(s), please enter the schemas to be replicated. Note that specifying any entry will cause additional privileges to be granted to dbvrep. Enter through a comma or space-delimited list. Enter the list of schemas (PL/SQL): [] You can also specify some advanced options: 1. Rename schemas or tables. 2. Specify filtering conditions. 3. (Tables only) Configure Change Data Capture; this does not maintain a copy of the source table, but logs all operations as separate entries. This is useful for ETL or as an audit trail. This usually requires adding of new columns (timestamps, old/new values etc.) to the target table. Specify rename name or filter condition for any of the specified schemas (YES/NO): [no] Following tables are defined for replication pairs: 1: reptest1 (Oracle) ==> reptest2 (Oracle), DDL: no, suffix: (no suffix), prepare: single-scn AVI(tables) 2: reptest2 (Oracle) ==> reptest1 (Oracle), DDL: no, suffix: (no suffix), prepare: single-scn AVI(tables) Enter number of replication pair to modify it, or "done": [done]  |
Step 4 - Process configuration
...
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.