Versions Compared

Key

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

...

This guide will provide you with an overview on getting started with  Dbvisit Replicate and Amazon EC2 The scenario used in this guide can be illustrated as:

Image RemovedImage Added


This document will provide you with an overview on the steps required to implement the above solution.  

...

  • Oracle Enterprise  11.2.0.4
  • Database in archivelog mode
  • Database called “SOURCE_DB” created
  • Dbvisit Replicate 2.78


Instance 2: EC2_TARGET  TARGET

...

  • Oracle 11.2.0.2 (XE) installed
  • Database called "EC2_TARGET" created
  • Install Dbvisit Replicate 2.78

 

TNSNAMES.ora on the EC2_TARGET

...

Code Block
languagetext
root@akl:[/root] # rpm -ivh dbvisit_replicate-2.68.0100-1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:dbvisit_replicate      ########################################### [100%]

...

Code Block
languagetext
[oracle ~]$ dbvrep
Initializing......done
Dbvisit Replicate version 2.78
Copyright (C) Dbvisit Software Limited.  All rights reserved.
No DDC file loaded.
Run "setup wizard" to start the configuration wizard or try "help" to see all commands available.

...

Code Block
languagetext
[oracle@]$ ./TEST-EC2-all.sh
Setting up Dbvisit Replicate configuration
Configure database SOURCE_DB...
This check fails if the DBID is not the expected one...


Ok, check passed.
Configure database EC2_TARGET...
This check fails if the DBID is not the expected one...


Ok, check passed.
Object grants for database SOURCE_DB...
Object grants for database EC2_TARGET...
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.68
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/oracle/TEST/config/TEST-EC2-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
ID of mine proces is 5B57FC60-2978-11E3-A0AD-58D8E5C48113. If not using DDC in database, set MINE_UNIQUE_ID to this value.
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
1 applier SCN set.
dbvrep> SET APPLY.INSTANTIATE_SCN NOW
Variable INSTANTIATE_SCN set to NOW for process APPLY.
dbvrep> ENGINE SUPPLEMENTAL LOGGING SCHEMA OE 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 SCHEMAS OE
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 OE
Table SCOTT.EMP instantiated at SCN 1229827
Table SCOTT.DEPT instantiated at SCN 1229827
Table SCOTT.SALGRADE instantiated at SCN 1229827
Table SCOTT.LOADTEST instantiated at SCN 1229827

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/TEST/APPLY.sh DBLINK xx USERID system/xxxx@EC2_TARGET
Created Data Pump script /home/oracle/TEST/APPLY.sh, using network import.
dbvrep> create ddcdb from ddcfile
DDC loaded into database (266 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 TEST-EC2-all.sh script runs:

1) Create the necessary directory(ies) on the servers:
ec2-54-82-3-111.compute-1.amazonaws.com: /home/oracle/TEST

2) Copy the DDC files to the server(s) where the processes will run:
ec2-54-82-3-111.compute-1.amazonaws.com: /home/oracle/TESTC/TEST-EC2-APPLY.ddc
sourceserver.com: /home/oracle/TEST/TEST-EC2-MINE.ddc

3) Review that path to dbvrep executable is correct in the run scripts:
/home/oracle/TEST/TEST-EC2-run-sourceserver.sh
/home/oracle/TEST/TEST-EC2-run-ec2-54-82-3-111.compute-1.amazonaws.com.sh

4) Copy the run script to the server(s) where the processes will run:
sourceserver.com: /home/oracle/TEST/TEST-EC2-run-dbvrds01.sh
ec2-54-82-3-111.compute-1.amazonaws.com: /home/oracle/TEST/TEST-EC2-run-ec2-54-82-3-111.compute-1.amazonaws.com.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.
Scripts for Data Pump/export/DDL were created as requested:
/home/oracle/TEST/APPLY.sh
Create referenced database links (if any) before running the scripts.


7) Start the replication processes on all servers:
sourceserver.com: /home/oracle/TEST/TEST-EC2-run-sourceserver.com.sh
ec2-54-82-3-111.compute-1.amazonaws.com: /home/oracle/TEST/TEST-EC2-run-ec2-54-82-3-111.compute-1.amazonaws.com.sh

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


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

...

Code Block
languagetext
[oracle@]$ ./TEST-EC2.sourceserver.com.sh
Initializing......done
[oracle@ ]$ DDC loaded from database (266 variables).
Dbvisit Replicate version 2.78
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/oracle/TEST/TEST=EC2-MINE.ddc loaded.
Starting process MINE...Created directory /home/oracle/TEST/ddc_backup
Created directory /home/oracle/TEST/log/
Created directory /home/oracle/TEST/log/trace/
Created directory /home/oracle/TEST/mine/
started

...

Code Block
languagetext
[oracle@]$ ./TEST-EC2-run-ec2-54-82-3-111.compute-1.amazonaws.com.sh
Initializing......done
DDC loaded from database (266 variables).
Dbvisit Replicate version 2.78
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/oracle/TEST/TEST-EC2-APPLY.ddc loaded.
Starting process APPLY...Created directory /home/oracle/TEST/ddc_backup
Created directory /home/oracle/TEST/log/
Created directory /home/oracle/TEST/log/trace/
Created directory /home/oracle/TEST/apply
started

...

Once both Mine and Apply is initialized:
 

\ Dbvisit Replicate 2.78.0100.3880(MAX edition) - Evaluation License expires in 30 days

...