Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added OFFLINE parameter to EXCLUDE COLUMN statements

...

Choose the tables to be replicated. In this case we are going to select the whole swingbench schema: REPOE. Do not choose any of the advanced features:

...

Exit out of dbvrep by typing exit

Excluding columns

Edit the .dbvrep file and add the columns to be excluded:

...

Add the following lines after the line "PROCESS SWITCH_REDOLOG"

No Format
EXCLUDE COLUMN OFFLINE REPOE.PRODUCT_INFORMATION.WARRANTY_PERIOD
EXCLUDE COLUMN OFFLINE REPOE.ORDER_ITEMS.CONDITION
EXCLUDE COLUMN OFFLINE REPOE.ORDERS.ORDER_DATE

Save the file and quit the vi editor.  OFFLINE keyword is nessesary since the replication is not yet running.

Initialize the Replication and loading the initial data

...

No Format
[oracle@source repoe_mysql]$ ./repoe_mysql-all.sh
Setting up Dbvisit Replicate configuration
Configure database ttorcl_src...
This check fails if the DBID is not the expected one...


Ok, check passed.
Configure database database=dbvrep
Object grants for database ttorcl_src...
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.8
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /u01/app/oracle/repoe_mysql/config/repoe_mysql-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
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: 7614151 (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 SETUP PAIR MINE AND APPLY
Applier SCN set (start=7614160, current=7614160).
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> 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> memory_set IGNORE_APPLY_DDL_DIFFERENCES YES
Variable IGNORE_APPLY_DDL_DIFFERENCES set to YES for process *.
dbvrep> SET PREPARE_SCHEMA_EXCEPTIONS none
Variable PREPARE_SCHEMA_EXCEPTIONS set to none for process *.
dbvrep> PROCESS SUPPLEMENTAL LOGGING SCHEMA "REPOE" ENABLE PRIMARY KEY
dbvrep> PROCESS SWITCH_REDOLOG
dbvrep> PROCESS WAIT_SCN_FLIP
Waited 2 seconds until scn_to_timestamp changed.
dbvrep> #single-scn instantiation: lock all tables and schemas
dbvrep> PROCESS LOCK SCHEMAS "REPOE"
Locking all schemas.
...locked 13 of 13 tables from REPOE 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 "REPOE"
Table REPOE.ADDRESSES instantiated at SCN 7615611
Table REPOE.AVI02 instantiated at SCN 7615611
Table REPOE.CARD_DETAILS instantiated at SCN 7615611
Table REPOE.CUSTOMERS is special: has system-generated column names. 
Table REPOE.CUSTOMERS instantiated at SCN 7615611
Column SYS_NC00017$ is special: virtual column. Excluding.
Column SYS_NC00017$ is special: hidden column. Excluding.
Column SYS_NC00017$ is special: system-generated column. Excluding.
Column SYS_NC00017$ is special: virtual column. Excluding.
Column SYS_NC00018$ is special: virtual column. Excluding.
Column SYS_NC00018$ is special: hidden column. Excluding.
Column SYS_NC00018$ is special: system-generated column. Excluding.
Column SYS_NC00018$ is special: virtual column. Excluding.
Table REPOE.INVENTORIES instantiated at SCN 7615611
Table REPOE.LOGON instantiated at SCN 7615611
Table REPOE.ORDERENTRY_METADATA instantiated at SCN 7615611
Table REPOE.ORDERS instantiated at SCN 7615611
Table REPOE.ORDER_ITEMS instantiated at SCN 7615611
Table REPOE.PRODUCT_DESCRIPTIONS instantiated at SCN 7615611
Table REPOE.PRODUCT_INFORMATION instantiated at SCN 7615611
Table REPOE.SALES instantiated at SCN 7615611
Table REPOE.WAREHOUSES instantiated at SCN 7615611
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> EXCLUDE COLUMN OFFLINE REPOE.PRODUCT_INFORMATION.WARRANTY_PERIOD
Exclude Column OFFLINE [REPOE.PRODUCT_INFORMATION.WARRANTY_PERIOD] set.
dbvrep> EXCLUDE COLUMN OFFLINE REPOE.ORDER_ITEMS.CONDITION
Exclude Column OFFLINE [REPOE.ORDER_ITEMS.CONDITION] set.
dbvrep> EXCLUDE COLUMN OFFLINE REPOE.ORDERS.ORDER_DATE
Exclude Column OFFLINE [REPSOE.ORDERS.ORDER_DATE] set.
dbvrep> #prepare script for instantiation
dbvrep> DDL DROP REPLICATE "REPOE"
dbvrep> DDL CREATE_FROM_DICT REPLICATE "REPOE"
dbvrep> PROCESS LOAD_REQUEST SCHEMA "REPOE" AT INSTANTIATE SCN
Table REPOE.ADDRESSES will be loaded using SCN 7615611.
Table REPOE.AVI02 will be loaded using SCN 7615611.
Table REPOE.CARD_DETAILS will be loaded using SCN 7615611.
Table REPOE.CUSTOMERS will be loaded using SCN 7615611.
Table REPOE.INVENTORIES will be loaded using SCN 7615611.
Table REPOE.LOGON will be loaded using SCN 7615611.
Table REPOE.ORDERENTRY_METADATA will be loaded using SCN 7615611.
Table REPOE.ORDERS will be loaded using SCN 7615611.
Table REPOE.ORDER_ITEMS will be loaded using SCN 7615611.
Table REPOE.PRODUCT_DESCRIPTIONS will be loaded using SCN 7615611.
Table REPOE.PRODUCT_INFORMATION will be loaded using SCN 7615611.
Table REPOE.SALES will be loaded using SCN 7615611.
Table REPOE.WAREHOUSES will be loaded using SCN 7615611.
dbvrep> create ddcdb from ddcfile
DDC loaded into database (366 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.
Some apply tables were (re)created by the .dbvrep script; now we run the grant scripts again.
Object grants for database ttorcl_src...
Object grants for database database=dbvrep
These steps are required after the repoe_mysql-all.sh script runs:

1) Create the necessary directory(ies) on the servers:
target: /u01/app/oracle/repoe_mysql

2) Copy the DDC files to the server(s) where the processes will run:
target: /u01/app/oracle/repoe_mysql/repoe_mysql-APPLY.ddc
source: /u01/app/oracle/repoe_mysql/repoe_mysql-MINE.ddc

3) Review that path to dbvrep executable is correct in the run scripts:
/u01/app/oracle/repoe_mysql/repoe_mysql-run-source.sh
/u01/app/oracle/repoe_mysql/repoe_mysql-run-target.sh

4) Copy the run script to the server(s) where the processes will run:
source: /u01/app/oracle/repoe_mysql/repoe_mysql-run-source.sh
target: /u01/app/oracle/repoe_mysql/repoe_mysql-run-target.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 target.

7) Make sure the data on apply are in sync as of time when setup was run.

8) Start the replication processes on all servers:
source: /u01/app/oracle/repoe_mysql/repoe_mysql-run-source.sh
target: /u01/app/oracle/repoe_mysql/repoe_mysql-run-target.sh

9) Start the console to monitor the progress:
/u01/app/oracle/repoe_mysql/start-console.sh

The above list is stored in /u01/app/oracle/repoe_mysql/Nextsteps.txt.
[oracle@source repoe_mysql]$ 

...