OGG Workshop 2
OGG Workshop 2
OGG Workshop 2
Version: 1.2
Code:
ORA10001EN10
Advanced
Heterogeneous Database Replication, Operational Business Intelligence
Date:
16-Feb-2013
High-Availability
and Zero-Downtime Migration and Upgrade
Copyrights 2012, PreciseTrace, Inc. | www.precisetrace.com/ebcc
2-1
1.0 An Overview
This hands-on workshop has been designed to give attendees best practices for
implementing Oracle GoldenGate 11g. The workshop walks you through the process to
install, configure and deploy Oracle GoldenGate 11g source and target instances. Then
perform business-specific implementation such as:
From the ground-up, attendees learn where to download Oracle GoldenGate 11g Media
Pack, perform quick-install for Oracle GoldenGate 11g, Configure Data Capture, learn
and perform initial data load techniques, Configure Data transfer and Configure Data
Apply.
For users who need to apply Oracle GoldenGate 11g for specific business areas, the
workshop guide them in step-by-step approach to learn the details of configuring the
modular architecture to build flexible yet high-performance integrated systems for
Oracle-to-Oracle or Heterogeneous environment supporting in-house developed and
Package applications systems.
Packaged Applications Support
Audience
Pre-Requisites
2-2
Objectives
By successfully completing the workshops, the attendees will be capable to work with
Oracle GoldenGate 11g and apply the learned best practices to their workplace. The
objective focus on major application of Oracle GoldenGate 11g to:
The workshop follows several routes, each depends on the need of your organization.
Figure 1 shows the business objective and the recommended workshops to practice.
Additional workshops can be completed after running the cleanup procedure.
2-3
Topics
Understand Oracle GoldenGate 11g application areas
Configuring Oracle GoldenGate 11g for Query and Report Offloading
Configuring Oracle GoldenGate 11g for Disaster Recovery Solutions
Configuring Oracle GoldenGate 11g for High-Availability Active-Passive
Configuring Oracle GoldenGate 11g for High-Availability Active-Active
Configuring Oracle GoldenGate 11g for Zero Downtime Upgrade and Migration
Configuring Oracle GoldenGate 11g for Operational BI and Data Warehouse
Configuring Oracle GoldenGate 11g for Heterogeneous Replication
Configuring Oracle GoldenGate 11g for Data Guard Integration
Review Understand Oracle GoldenGate 11g network topologies and Architecture
Un-Directional Configuration Query offloading
Bi-Directional Configuration for Standby Database and Active-Active for HA
Master-Master Configuration for Enterprise Load Balancing
Cascade using Intermediate Systems for Data Transformation
Broadcast Configuration for Data Distribution
Data Warehouse and Data mart Integration and consolidation configuration
Prepare Database Environment and Install Oracle GoldenGate 11g
Enable Database Supplemental Logging
Review Oracle GoldenGate 11g requirements for Operating System and Databases
Download and Install Oracle GoldenGate 11g
Working with GoldenGate 11g Software Command Interface (GGSCI)
Create Oracle GoldenGate 11g instance and directory structure
Configure the Source and Target Managers processes
Understand and configure Managers best-practice parameters
Login to Oracle Database using Oracle GoldenGate 11g
Run basic GGSCI commands
Create and Manage Checkpoint table
Working with TRANDATA command to enable Tables Supplemental Logging
Oracle GoldenGate 11g Initial Data Load Techniques
Work with Initial Data Load using File to Replicat method
Work with Initial Data Load using Direct load method
Understand Initial Data Load using Bulk-Direct load method
Understand Initial Data Load using Database Utility
Use handle collision for Initial Data Load Techniques
Control collision handling using SEND Command
Control Replicat for Initial Load and RBA handling
Oracle GoldenGate 11g: Uni-Directional Setup for Report Offloading
Configure, create and manage Primary Extract processes and local trails
Configure, create and manage Data Pump Extract process for routing to target
Configure, create and manage Remote Trial Files
Configure, create and manage Replicat process
Use administrative command to view process reports and troubleshooting
Understand Memory allocation by Oracle GoldenGate 11g
Advanced Heterogeneous Database Replication, Operational Business Intelligence
High-Availability and Zero-Downtime Migration and Upgrade
2-4
2-5
2-6
2-7
Setting
10.2.0.5.0
11.1.1.1.2
S1T2.precisetrace.com
S1T2
/u01/app/oracle/product/10.2.0/db_1
Oracle
/u01/app/oracle/oradata/S1T2/
/u01/app/oracle/flash_recovery_area
AL32UTF8
AL16UTF16
Little
Setting
11.2.0.3.0
11.1.1.1.2
T1E2.precisetrace.com
T1E2
/u01/app/oracle/product/11.2.0/dbhome_1
oracle_4U
+DATA
+FRA
AL32UTF8
AL16UTF16
Little
Setting
11.2.0.3.0
+ASM.precisetrace.com
+ASM
/u01/app/oracle/product/11.2.0/grid
oracle_4U
+DATA (Norma)
+FRA (External)
44GB
/dev/x*
2-8
Setting
11.2.0.3.0
11.1.1.1.2
/u01/app/oracle/product/11.2.0/dbhome_1
Description
Oracle Database Version
Oracle Database Release
Oracle Database Update
Database Type: Source or Target
Source or Target number
DISPLAY
Program executable
Username
Password
Option
Example
10 or 11 only
1 or 2
1, 2, 3, 4 or 5
s, t or i
1, 2, 3, n-1, n
Localhost, Hostname or IP
sqlplus, rman, lsnrctl, gaskin, etc
System
Oracle
Connect string, target, local, etc.
2-9
Description
Insert one row only starting at row
100001.
Insert 10 rows starting at row
100002.
2-10
Initload.dat
Extract File
4.1 Objectives
2-11
Scenario
You are assigned the task to configure Oracle GoldenGate 11g for the Source database
(S1T2) running on Oracle Database 10g EE Version 10.2.0.5.0 to T1E2, and the Target
Database (T1E2) running on Oracle Database 11g EE Version 11.2.0.3.0.
This is Workshop 2 of 5 to perform Oracle Database 11g: Zero-Downtime Migration and
Upgrade.
Tasks Summary
No
Tasks
Step/Instructions
Step 1
Step 2
Step 3
Step 4
Step 11
Step 14
Step 15
2
3
4
5
6
7
8
9
10
11
Completed/Note
2-12
GLOBALS
Parameters File
Requirement
2-13
Checkpoint Table
2-14
GLOBALS
Parameters File
Requirement
2-15
Checkpoint Table
Note
2-16
Manager Process
STOPPED
RUNNING
2-17
Online Status
Report
You have two option to display the manager status report, which
very necessary to confirm before proceeding further Extract and
Replicat configurations.
GGSCI (edm6r1s30.precisetrace.com) 1>start mgr
Manager started.
GGSCI (edm6r1s30.precisetrace.com) 2>info mgr
Manager is running (IP port edm6r1s30.precisetrace.com.7810).
GGSCI (edm6r1s30.precisetrace.com) 3>info all
Program
Chkpt
Status
MANAGER
RUNNING
Group
Lag
Time Since
Ensure the correct IP port number, which is 7810 for the Source
and 7811 for the Target.
2-18
Manager Process
STOPPED
RUNNING
2-19
Online Status
Report
You have two option to display the manager status report, which
very necessary to confirm before proceeding further Extract and
Replicat configurations.
GGSCI (edm6r1s30.precisetrace.com) 1>start mgr
Manager started.
GGSCI (edm6r1s30.precisetrace.com) 2>info mgr
Manager is running (IP port edm6r1s30.precisetrace.com.7811).
GGSCI (edm6r1s30.precisetrace.com) 3>info all
Program
Chkpt
Status
MANAGER
RUNNING
Group
Lag
Time Since
Ensure the correct IP Port number, which is 7810 for the Source
and 7811 for the Target.
2-20
ELOAD01 Extract
The initial data load file is created on the Target Server using the
parameters rmthost and rmtfile which refer to:
2-21
ELOAD01 Extract
S1T2@edm6hp99.precisetrace.com$ pwd
/u01/app/ogg/10.2.0
S1T2@edm6hp99.precisetrace.com$ extract paramfile
dirprm/eload01.prm reportfile dirrpt/eload01.rpt
S1T2@edm6hp99.precisetrace.com$
Note
2-22
Step 11: Verify Replicat data File and View Extract Report
After successful
completion of the initial
load, verify the data file
location on the Target
Oracle GoldenGate 11g.
The location should is
configured using the
parameter rmtfile on the
Source Extract parameter
file.
If the file does not exist,
then the initial load had
failed and must be re-run.
Before re-running the
extract command,
investigate the report file,
correct the issue and then
re-run the command.
The initial load creates the data file on the Target server. This
will be used by the Replicat to load data into the Database.
GGSCI (edm6hp99.precisetrace.com) 2> exit
S1T2@edm6hp99.precisetrace.com$ pwd
/u01/app/ogg/10.2.0
S1T2@edm6hp99.precisetrace.com$ cd ../11.2.0/dirdat
S1T2@edm6hp99.precisetrace.com$ ls -al
total 37148
drwxrwxr-x 2 oracle oinstall
4096 May 21 19:11 .
drwxrwxr-x 15 oracle oinstall
4096 May 21 18:33 ..
-rw-rw-rw- 1 oracle oinstall 37986149 May 21 19:11
initload01.dat
S1T2@edm6hp99.precisetrace.com$
The size of the data file depends on the amount of tables data.
The table should not be compressed, and if its, then table
compressing need to be disabled before performing initial load
extract.
2-23
***************************************************
Oracle GoldenGate Capture for Oracle
Version 11.1.1.1.2
OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 10g on Oct 7
2011 14:35:40
Copyright (C) 1995, 2011, Oracle and/or its
affiliates. All rights reserved.
Starting at 2012-05-21 19:11:29
***************************************************
Operating System Version:
Linux
Version #1 SMP Thu Sep 3 02:28:20 EDT 2009, Release
2.6.18-164.el5PAE
Node: edm6hp99.precisetrace.com
Machine: i686
soft limit
hard limit
Address Space Size
:
unlimited
unlimited
Heap Size
:
unlimited
unlimited
File Size
:
unlimited
unlimited
CPU Time
:
unlimited
unlimited
100000
0
0
0
100000
0
0
0
0
37985196
2-24
RLOAD01 Replicat
After moving the data from the Source Database to the Target
Server, its now ready for upload into the Target Database. To
avoid termination of process due to collision, ensure the
parameter handlecollisions is included in the parameter
file rload01.rpm.
GGSCI (edm6hp99.precisetrace.com) 1>edit params rload01
replicat rload01
specialrun
assumetargetdefs
handlecollisions
userid ogg_admin, password oracle
extfile ./dirdat/initload01.dat
discardfile ./dirrpt/rload01.dsc, purge
map osm$repapi.*, target osm$repapi.*;
end runtime
After successful run of the initial load Replicat, the process will
automatically terminate with status STOPPED.
To avoid future start of this Replict unintentionally, its
recommended to delete this Replicat from the configuration.
Delete the Replicat requires login to the Database from Oracle
GoldenGate 11g.
2-25
Step 13: Add and Start Initial Load Replicat Process on Target
The initial to Replicat load
method requires adding
the Replicat process to
Oracle GoldenGate 11g
instance.
Because its a special run
process, do no start and
the status should be on
STOPPED status.
From the Operating
System, run the command
replicat. The process will
be started, and after the
load on the Target
Database is completed, it
will remain on STOPPED
status, and should be
deleted.
ADD REPLICAT
Command
Execute the ADD REPLICAT command. Then exit and run the
replicat process from the Operating System.
GGSCI (edm6hp99.precisetrace.com) 2>add replicat rload01,
extfile ./dirdat/initload01.dat
REPLICAT added.
GGSCI (edm6hp99.precisetrace.com) 3> info all
Program
Chkpt
Status
Group
Lag
Time Since
MANAGER
REPLICAT
RUNNING
STOPPED
RLOAD01
00:00:00
00:00:04
pwd
cd ..
pwd
replicat pf dirprm/rload01.prm
T1E2@edm6hp99.precisetrace.com$
2-26
View Report
100000
0
0
0
100000
0
0
0
2-27
SQL*Plus
If the result in not 100,000 then there was collision and the
discard file should be reviewed. For best practice, before
starting the Replicat process, disable DDL replication, disable
constraint, and use wild-card if necessary instead of the table
names. If the source Database is active, then an Extract
process should be configured and started before the initial load.
2-28