You are on page 1of 30

Oracle GoldenGate 11g: Implementers Workshop

Oracle GoldenGate 11g: Implementers Workshop


Advanced Heterogeneous Database Replication, Operational Business
Intelligence and Data Warehouse, Business Continuity and Zero-Downtime
Migration and Upgrade
Workshop 1
Prepare and Install
Oracle GoldenGate 11g Environment

Workshop Developer: Fawzi A. Alswaimil


Contributors: Deema F. Alswaimil
Khalid W. Hawashin

Version:Heterogeneous
1.2
Advanced
Database Replication, Operational Business Intelligence,
Code: ORA10001EN10
High-Availability
and Zero-Downtime Migration and Upgrade
Date: 16-Feb-2013

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-1

Oracle GoldenGate 11g: Implementers Workshop

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:

Oracle GoldenGate 11g for Report Offloading


Oracle GoldenGate 11g for Disaster Recovery
Oracle GoldenGate 11g for High-Availability
Oracle GoldenGate 11g for Zero-Downtime Migration and Upgrade
Oracle GoldenGate 11g for Operational Business Intelligence
Oracle GoldenGate 11g for Data Warehouse
Oracle GoldenGate 11g for Heterogeneous Replications
Oracle GoldenGate 11g for Data Guard Integration

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

Oracle E-Business Suite


SAP R3
Oracle Siebel
Oracle JD Edward
Salesforce.com

Audience

IT Managers and Team-Leaders


Database Administrators
Data Warehouse Analysts
System Administrators
Network Administrators
Storage Administrators

Pre-Requisites

Familiarity with Oracle Basic Administrative commands


Familiarity with Basic SQL Data Manipulation Language (DML)
Understands Distributed database concept

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-2

Oracle GoldenGate 11g: Implementers Workshop

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:

Understand Oracle GoldenGate 11g applications


Prepare and configure source and target database environments
Work with Oracle GoldenGate components
Configure Oracle GoldenGate 11g for Uni-Directional applications
Configure Oracle GoldenGate 11g for Bi-Directional applications
Configure Oracle GoldenGate 11g Advanced Replication
Configure Oracle GoldenGate 11g DDL Replication
Configure Oracle GoldenGate 11g for Heterogeneous Replication
Configure Oracle GoldenGate 11g Intermediate Systems
Configure Oracle GoldenGate 11g Integrated Capture
Configure Oracle GoldenGate 11g on Data Guard Environment
Configure and work with Oracle GoldenGate 11g Management Pack

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.

Fig.1: Workshop Routes


Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-3

Oracle GoldenGate 11g: Implementers Workshop

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

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-4

Oracle GoldenGate 11g: Implementers Workshop

Use Oracle GoldenGate 11g Uni-Directional for Report Offloading


Use Oracle Database 11g OLAP Materialized View with Oracle GoldenGate 11g
Enable and verify Report offloading on Oracle GoldenGate 11g target

Oracle GoldenGate 11g: Bi-Directional Setup for Business Continuity


Configure, create and manage Primary Extract processes and local trails
Configure, create and manage Data Pump Extract process
Configure, create and manage Remote Trial Files
Configure, create and manage Replicat process
Use administrative command to view process reports and troubleshooting
Detect and resolve conflict for Update and Delete DML operations
Understand and apply Oracle GoldenGate 11g Techniques to resolve conflicts
Develop stored procedure and SQL queries for managing and resolving conflicts
Oracle GoldenGate 11g Advanced Configuration and DDL Replication
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
Use COLSEXCEPT to exclude unsupported Data types
Use COLMAP feature for mismatched table structures
Use SQLEXEC to invoke PL/SQL Stored procedure
Use WHERE clause to implement row filtering
Use FILTER to apply complex row and column manipulations
Use Oracle GoldenGate 11g Build-In functions
Use DEFGEN Utility
Use RANGE Function to deploy Replicat parallelism
Perform basic and advanced DDL replications
Oracle GoldenGate 11g Intermediate System for Query Offloading
Configure, create and manage Primary Extract processes and local trails
Configure, create and manage Data Pump Extract process for Source System
Configure, create and manage Remote Trial Files for Source System
Configure, create and manage Data Pump Extract process for intermediate systems
Configure, create and manage Remote Trial Files for intermediate systems
Configure, create and manage Replicat processes
Use administrative command for reporting and troubleshooting
Understand Memory allocation by Oracle GoldenGate 11g
Use Oracle GoldenGate 11g Uni-Directional for Report Offloading
Use Oracle Database 11g OLAP Materialized View with Oracle GoldenGate 11g
Enable and verify Report offloading on Oracle GoldenGate 11g target
Oracle GoldenGate 11g Integrated Capture
Configure, create and manage Integrated Capture processes
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
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-5

Oracle GoldenGate 11g: Implementers Workshop

Use administrative command for reporting and troubleshooting

Oracle GoldenGate 11g Zero Downtime Migration and Upgrade


Configure, create and manage Source Extract process and local trails
Configure, create and manage Data Pump Extract process for routing to target
Configure, create and manage Remote Trial Files
Monitor Remote Trail Queue
Use RMAN to perform Database Cloning
Use RMAN to perform Migration to ASM
Use DBUA to perform upgrade from Oracle Database Release 10.2 to 11.2
Configure, create and manage Replicat process
Verify Source and Target Database are synchronized
Oracle GoldenGate 11g Heterogeneous Replication
Configure, create and manage Primary Extract processes and local trails for Oracle
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 for MySQL
Verify and testing data replication
Use administrative command for reporting and troubleshooting
Oracle GoldenGate 11g Integration with Oracle Database 11g Data Guard
Configure Oracle Database 11g Data Guard
Configure, create and manage Primary Extract processes and local trails on Standby
Configure, create and manage Data Pump Extract process for routing to target on
Standby Database
Configure, create and manage Remote Trial Files
Configure, create and manage Replicat process
Use administrative command for reporting and troubleshooting
Oracle GoldenGate 11g Management Packs, Veridata
Understand Oracle GoldenGate 11g Veridata Architecture
Review Oracle GoldenGate 11g Veridata components
Oracle GoldenGate 11g Veridata Installation
Configuring GoldenGate 11g Veridata Java Agent
Using GoldenGate 11g Veridata Web-Interface
Perform Data verify and rectify operation
Running GoldenGate 11g Veridata Reports
Oracle GoldenGate 11g Management Packs, Director
Understand Oracle GoldenGate 11g Director
Understand Oracle GoldenGate 11g Director Installation
Configuring Oracle GoldenGate 11g Director Server
Using Oracle GoldenGate 11g Client Interface
Using Oracle GoldenGate 11g Director Web Interface
Oracle GoldenGate 11g Management Packs, Configuration Assistant
Understand Oracle GoldenGate 11g Configuration Assistant
Use Oracle GoldenGate 11g Configuration Assistant to verify environments
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-6

Oracle GoldenGate 11g: Implementers Workshop

Use Oracle GoldenGate 11g Configuration Assistant runtime options


Oracle GoldenGate 11g Configuration Assistant to review and verify design
Oracle GoldenGate 11g Configuration Assistant to deploy to Target Instance

Oracle GoldenGate 11g Optimization, Tuning and Troubleshooting


Implementing Compression, Encryption
Implementing GGSCI security
Working with Oracle GoldenGate 11g MACRO
Working with LOGDUMP Utility
Implement BATCHSQL feature for transaction optimization
Monitoring Lag and Statistics
Performance Tuning for Extract
Performance Tuning for Data Pump
Performance Tuning for Replicat
Oracle Database 11g: Data Guard Fundamentals

Understand Data Guard Standby Database


Configure and work with Data Guard Broker
Data Guard Architecture
Creating Physical Standby Database
Understand Protection levels
Work with Database Role Settings
Monitor Data Guard Trace capabilities
Understand Fast-Start Failover
Understand Startup and Shutdown processes
Apply best-practice Data Guard Configuration
Perform Database Switchover and Failover

Oracle Database 11g: Upgrade Fundamentals


Oracle Database 11g Upgrade Techniques
Oracle Database 11g Installation Workflow
Oracle Database 11g Upgrades road Map
Oracle Database 11g Upgrades Methods for Zero-Downtime
Pre-Upgrade Scripts and configuration
Pre-Upgrade Scripts report
Gathering Dictionary statistics
Oracle Database 11g Database Upgrade Assistant (DBUA)
Performing Oracle Database 11g Upgrade using DBUA GUI
Performing Oracle Database 11g Upgrade using DBUA Silent mode
Post-Upgrade configuration
Time Zone file Version and Time Zone package
Oracle Recovery Manager Catalog Upgrade

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-7

Oracle GoldenGate 11g: Implementers Workshop

2.0 Workshop 1 Database Environment

The workshop consists of 1 Source Oracle Database 10g Release 2 (Local) and 1
Target Oracle Database 11g Release 2 (Remote). Both Oracle Installations use Oracle
GoldenGate 11g.
2.1 Database Name: S1T2 (Source)
Object name
RDBMS Version
Oracle GoldenGate 11g
Global Database Name
SID
Oracle Home
Password for all accounts
Database File Directory
Flush Recovery Area
Character Set
National Character Set
Endian Format

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

2.2 Database Name: T1E2 (Target)


Object name
RDBMS Version
Oracle GoldenGate 11g
Global Database Name
SID
Oracle Home
Password for all accounts
Database File Directory
Fast Recovery Area
Character Set
National Character Set
Endian Format

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

2.3 ASM Instance: +ASM


Object name
Clusterware Version
Global Database Name
SID
Oracle Home
Password for all accounts
Data Disk Group (DG)
Fast Recovery Area DG
FRA Size
ASM Disks

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*

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-8

Oracle GoldenGate 11g: Implementers Workshop

2.4 Intermediate System


Object name
RDBMS Version
Oracle GoldenGate 11g
Oracle Home

Setting
11.2.0.3.0
11.1.1.1.2
/u01/app/oracle/product/11.2.0/dbhome_1

2.5 Workshop Environment and Credentials

2.6 ora.env Utility


$ ora.env arg1 arg2 arg3 arg4 arg5 [arg6][arg10]
Argument
arg1
arg2
arg3
arg4
arg5
arg6
arg7
arg8
arg9
arg10

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.

$ora.env 10 2 0 s 1 localhost sqlplus

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-9

Oracle GoldenGate 11g: Implementers Workshop

3.0 Workload Simulator for Online System Monitor (OSM) Database


Testing Oracle GoldenGate 11g transactions handling from the source Database to the
target Database for one way, or from the Target Database to the Source for Two-Way is
done by a PL/SQL Application Programmatic Interface (API) called TRANS_LOAD.
3.1 How to use TRANS_LOAD Simulator?
TRNAS_LOAD API simulates Small-Medium-Large (S-M-L) Workload for CUSTOMERSPOLICIES Database. TRANS_LOAD can be invoked for different S-M-L workloads;
examples of the options available are described in the table below.
EXEC Call Command option
BEGIN
TRANS_LOAD(1, 100001);
END;
BEGIN
FOR i IN 100002..100012 LOOP
TRANS_LOAD(1, i);
END LOOP;
End;
BEGIN
FOR i IN 100013..100113 LOOP
TRANS_LOAD(1, i);
DBMS_LOCK.SLEEP(2);
END LOOP;
END;

Description
Insert one row only starting at row
100001.
Insert 10 rows starting at row
100002.

Insert 100 rows starting at row


100013, with sleep option of 2
seconds between each 2 rows.

The Database table structure described below.


S1T2>DESC osm$repapi.customers
Name
Null?
Type
---------------------------- ------------------CUST_NO
NOT NULL NUMBER
CUST_NAME
NOT NULL VARCHAR2(128)
CUST_EMAIL
NOT NULL VARCHAR2(128)
CUST_MOBILE
NOT NULL VARCHAR2(16)
CUST_ADDRESS
VARCHAR2(128)
S1T2>DESC osm$repapi.policies
Name
Null?
Type
---------------------------- ------------POL_NO
NOT NULL NUMBER
POL_FROM
NOT NULL DATE
POL_TO
NOT NULL DATE
POL_VALUE
NOT NULL NUMBER(8,2)
POL_SUB_TOTAL
NOT NULL NUMBER(8,2)
PT_CODE
NOT NULL VARCHAR2(8)
DT_CODE
VARCHAR2(8)
POL_TOTAL
NOT NULL NUMBER(8,2)
CUST_NO
NOT NULL NUMBER
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-10

Oracle GoldenGate 11g: Implementers Workshop

4.0 Preparation of Oracle GoldenGate 11g


The diagram illustrates the
workshop workflow. The
major tasks are:

Workshop 1: Prepare and Install

Installation
Database Configuration
Enable Table Logging

2
Quick Install

The Source Server


(localhost) and Database
(S1T2) are operational for
current applications. The
Target Server and
Database (T1E2) are ready
for configuration of Oracle
GoldenGate 11g.

Database Supplemental Logging

TCP/IP Network
3
Table-Level Logging

This is a one-host setup


and configuration as a
localhost environment.

4.1 Objectives

After completing this workshop lab, you will be able to:

4.2 Lab Setup

Verify the Workshop environment and requirements


Prepare Oracle GoldenGate 11g Software for Oracle
Database 10g and Oracle Database 11g.
Perform Oracle GoldenGate 11g quick installation for Oracle
Database 10g and Oracle Database 11g
Enable Oracle Database 10g and Oracle Database 11g
Supplemental Logging
Enable Oracle Database 10g and Oracle Database 11g
Table-Level Logging

This lab requires that your environment has the following


Configuration

Oracle Database 10g EE Release 10.2.0.5.0


Oracle Database 11g Grid Infrastructure Release 11.2.0.3.0
Oracle Database 11g EE Release 11.2.0.3.0
Source Database: S1T2
Source Instance: S1T2
Source Global Database: S1T2.precisetrace.com
Network configuration files already setup for S1T2 and T1E2

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-11

Oracle GoldenGate 11g: Implementers Workshop

5.0 Workshop Tasks


In this exercise, you will use Oracle SQL*Plus to configure the Source and Target
Database environment. From the Linux Shell Commands, a quick Oracle GoldenGate
11g will be performed on the Source and Target Servers (localhost).
Duration: 45 Minutes

Scenario
You are assigned the task to configure Oracle GoldenGate 11g for the Source database
(S1T2) running on Oracle Database 10g EE Version10.2.0.5.0 to T1E2. The Target
Database (T1E2) running on Oracle Database 11g EE Version 11.2.0.3.0.
Successful completion of Workshop 1 is mandatory before proceeding to Workshop 2.

Tasks Summary
No

Tasks

Step/Instructions

Verify the Source and Target


Database environment and
Operating mode.
Enable and Start Supplemental
Logging for Source and Target
Databases
Perform Quick install for Oracle
GoldenGate 11g on Source and
Target Database Server
Create Oracle GoldenGate 11g
Database Administrator on
Source and Target
Start Oracle GoldenGate 11g
Software Command Interface on
both Source and Target
Login to Source Database from
Oracle GoldenGate 11g and
determine version details
Login to Target Database from
Oracle GoldenGate 11g and
determine version details
Create Source and Target
Oracle GoldenGate 11g Subdirectories
Create table-level logging for
Source and Target Databases
using GGSCI.

Step 1 and Step 2

Step 3 and Step 4

Step 5 and Step 6

Step 7 and Step 8

Step 9 and Step 10

Step 11 and Step 12

Step 13 and step 14

Step 15 and Step 16

Step 17 and Step 18

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

Completed/Note

1-12

Oracle GoldenGate 11g: Implementers Workshop

Step 1: Verify Source Database Environment


Familiarize yourself with
the Source Database
(S1T2) Operating
environment. Use the
provided utility ora.env to
set the current instance
variables.
The Source Database
(S1T2) uses a workload
simulator application
(TRANS_LOAD) that will be
used to verify the result
using different workloads.
If you encounter any type
of error on Step 1, please
do not continue and seek
assistance to resolve the
issue.

Source Database
(S1T2)

The Source Database S1T2.precisetrace.com should be


operating on ARCHIVELOG mode. This is a basic requirement
for Oracle GoldenGate 11g.
$ ora.env 10 2 0 s 1 localhost sqlplus system oracle local
S1T2>select log_mode
2
fromv$database;
LOG_MODE
-----------ARCHIVELOG
S1T2>

Current
Environment
Settings

ORACLE_SID=S1T2
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
OGG_HOME=/u01/app/ogg/10.2.0
DISPLAY=localhost:0.0

Exit the current SQL*Plus session, use the echo Shell


command to confirm the values for the above variables.
$echo
$echo
$echo
$echo

$ORACLE_SID
$ORACLE_HOME
$OGG_HOME
$DISPLAY

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-13

Oracle GoldenGate 11g: Implementers Workshop

Step 2: Verify Target Database Environment


Familiarize yourself with
the Target Database
(T1E2) Operating
environment. Use the
provided utility ora.env to
set the current instance
variables.
The target Database is
using Automatic Storage
Management, and under
Oracle Restart
infrastructure for higher
availability.
If you encounter any type
of error on Step 2, please
do not continue and seek
assistance to resolve the
issue.

Target Database
(T1E2)

The target Database T1E2.precisetrace.com should be


operating on ARCHIVELOG mode.
$ ora.env 11 2 0 t 1 localhost sqlplus system oracle_4U local
T1E2>select log_mode
2
fromv$database;
LOG_MODE
-----------ARCHIVELOG
T1E2>

Current
Environment
Settings

ORACLE_SID=T1E2
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
OGG_HOME=/u01/app/ogg/11.2.0
DISPLAY=localhost:0.0

Exit the current SQL*Plus session, use the echo Shell command
to confirm the values for the above environment variables.
$echo
$echo
$echo
$echo

$ORACLE_SID
$ORACLE_HOME
$OGG_HOME
$DISPLAY

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-14

Oracle GoldenGate 11g: Implementers Workshop

Step 3: Enable Source Supplemental Logging


Enable Source (S1T2)
Database Supplemental
Logging. Multiple
Supplemental Logging
options available. Oracle
GoldenGate 11g requires
the PRIMARY KEY option.
If disk space is of concern,
Specify the PRIMARY
supplemental only.
The default options enable
all types of supplemental.
Specific option can be set
for:

PRIMARY EKY
UNIQUE KEY
FOREIGN KEY

Supplemental
Logging (S1T2)

Supplemental logging enables Oracle GoldenGate 11g to locate


the target row for update and delete transaction type, leading to
the entire row containing that columnwill be placed in the redo
log file.
$ ora.env 10 2 0 s 1 localhost sqlplus system oracle local
S1T2>alter database add supplemental log data;
Database altered.
S1T2>alter system switch logfile;
System altered.
S1T2>

The second SQL*Plus command starts the Database


supplemental logging. Other Supplemental logging commands
specific to Primary Key and Unique Key constraints.
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA
(PRIMARY KEY) COLUMNS;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA
(UNIQUE) COLUMNS;

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-15

Oracle GoldenGate 11g: Implementers Workshop

Step 4: Enable Target Supplemental Logging


Enable Source (T1E2)
Database Supplemental
Logging. Number of
Supplemental commands
available. Oracle
GoldenGate 11g requires
the PRIMARY KEY type of
supplemental logging only.
Not specify the
supplemental type, the
command enable all types
of supplemental, which
are:

PRIMARY EKY
UNIQUE KEY
FOREIGN KEY

Supplemental
Logging (T1E2)

Supplemental logging enables Oracle GoldenGate 11g to locate


the target row for update and delete type of transactions.
$ ora.env 11 2 0 t 1 localhost sqlplus system oracle_4U local
T1E2>alter database add supplemental log data;
Database altered.
T1E2>alter system switch logfile;
System altered.
T1E2>

The second SQL*Plus command starts the Database


supplemental logging. Other Supplemental logging commands
specific to Primary Key and Unique Key constraints.
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN
KEY) COLUMNS;

To find out the current Database Supplemental logging, query


v$database dynamic view. In addition, when enabling
supplemental logging consider increasing the size of the online
redo log groups to support the redo entries generated
bydatabase supplemental logging.
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-16

Oracle GoldenGate 11g: Implementers Workshop

Step 5: Source Oracle GoldenGate 11g, Quick Install


The workshop uses Oracle
Enterprise Linux 5 update
4, which requires Oracle
Database 11g and
GoldenGate 11g of 32-bit
size. When downloading
the software from Oracle
eDelivery cloud, ensure
the download the 32-bit
release.
Oracle GoldenGate 11g for
Oracle Database 10g
requires Oracle Database
10g libraries.

Quick Installation for


Source

Oracle GoldenGate 11g does not have an installation interface;


instead it uses a quick type of installation method, by extracting
the software using the Linux/UNIX command tar xvf.
S1T2>exit
Disconnected from Oracle Database 10g Enterprise Edition
Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
$ cd $OGG_HOME
$ ls
fbo_ggs_Linux_x86_ora10g_32bit.tar
$ tar -xvf fbo_ggs_Linux_x86_ora10g_32bit.tar
UserExitExamples/
UserExitExamples/ExitDemo_pk_befores/
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.vcproj
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.AIX
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.LINUX
UserExitExamples/ExitDemo_pk_befores/readme.txt
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.HPUX
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.c
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.S

To find your database version details and the bit-size, query


the dynamic performance view v$version. It displays the
components, version and the bit-size.
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-17

Oracle GoldenGate 11g: Implementers Workshop

Step 6: Target Oracle GoldenGate 11g, Quick Install


The workshop uses Oracle
Enterprise Linux 5 update
4, which requires Oracle
Database 11g and
GoldenGate 11g of 32-bit
size. When downloading
the software from Oracle
eDelivery cloud, ensure
the download the 32-bit
release.
Oracle GoldenGate 11g for
Oracle Database 11g
requires Oracle Database
11g libraries.

Quick Installation
for Target

Oracle GoldenGate 11g does not have an installation interface;


instead it uses a quick type of installation method, by extracting
the software using the Linux/UNIX command tar xvf.
T1E2>exit
Disconnected from Oracle Database 11g Enterprise Edition
Release 11.2.0.3.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data
Mining
and Real Application Testing options
$ cd $OGG_HOME
$ ls
fbo_ggs_Linux_x86_ora11g_32bit.tar
$ tar -xvf fbo_ggs_Linux_x86_ora11g_32bit.tar
UserExitExamples/
UserExitExamples/ExitDemo_pk_befores/
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.vcproj
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.AIX
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.LINUX
UserExitExamples/ExitDemo_pk_befores/readme.txt
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.HPUX

To find details about Oracle GoldenGate 11g release, start


Oracle GoldenGate Software Command Interface (GGSCI), and
then enter the GoldenGate command versions after logging to
the database from Oracle GoldenGate 11g.

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-18

Oracle GoldenGate 11g: Implementers Workshop

Step 7: Source Oracle GoldenGate 11g Administrator


Even though the
workshop grants DBA to
Oracle GoldenGate 11g
Administrator, In
production environment,
the principle of least
privileges should be the
practice. The Oracle
GoldenGate 11g
administrator for Source
uses different set of
Database privileges for
Target Database.
Do not subject the
administrator to very strict
Database profile to avoid
aborting Extract and
Replicat operations and/or
other type of commands.

ogg_admin
Database User

While connected as SYSDBA, perform the below command to


create and grant ogg_admin. The command first
createogg_admin, then grant CREATE SESSION and DBA
privileges to the administrator.
S1T2>grant create session, dba to ogg_admin identified by
oracle;
Grant succeeded.
S1T2>alter user ogg_admin quota unlimited on users;
User altered.
S1T2>

For production environment, you should create a dedicated


permanent default tablespace(OGG_DAT) for the Oracle
GoldenGate 11g Administrator. This practice very essential
when the Database is of type OLAP where the Oracle
GoldenGate 11g should be the only Tablespace that needs
frequent online backups.
RMAN> backup tablespace OGG_DAT;

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-19

Oracle GoldenGate 11g: Implementers Workshop

Step 8: Target Oracle GoldenGate 11g Administrator


Even though the workshop
grants DBA to Oracle
GoldenGate 11g
Administrator, In
production environment,
the principle of least
privileges should be the
practice. The Oracle
GoldenGate 11g
administrator for Source
uses different set of
Database privileges for
Target Database.
Do not subject the
administrator to very strict
Database profile to avoid
aborting Extract and
Replicat operations and/or
other type of commands.

ogg_admin
Database User

While connected as SYSDBA, perform the below command to


create and grant ogg_admin. The command first create
ogg_admin, then grant CREATE SESSION and DBA privileges
to the administrator.
T1E2>grant create session, dba to ogg_admin identified by
oracle;
Grant succeeded.
T1E2>alter user ogg_admin quota unlimited on users;
User altered.
T1E2>

Alternatively, you may grant only the specific privileges required


by the Replicat process on the target.
T1E2>grant CREATE SESSION, ALTER SESSION, RESOURCE,
2>CONNECT, SELECT ANY DICTIONAY, SELECT ANY
3>TABLE, INSERT, UPDATE, DELETE <TABLES>, CREATE
4>TABLE to ogg_admin;

Delete transaction on the Source result on delete transaction of


the target, ogg_admin need DELETE privilege on these tables,
otherwise, DBA privilege required.
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-20

Oracle GoldenGate 11g: Implementers Workshop

Step 9: Start Oracle GoldenGate 11g GGSCI on Source


The Workshops is
Command-Line oridented.
This will give you an
excellent understanding of
the commands used
during the workshop.
An alternative is to use the
Graphical User Interface,
Oracle GoldenGate 11g
Director and Monitor.
Most of the command on
the workshop does not
require Database Login, as
it will be creating filebased parameter files and
adding processes to Oracle
GoldenGate 11g instance.

Start GGSCI

Start GoldenGate 11g Software Command Interface (GGSCI).


$ ora.env 10 2 0 s 1 localhost ggsci
ora.env Utility: Release 1.2 (Beta) on Mon May 21 08:44:40 AST
2012
Copyright (c) 2008, 2012, PreciseTrace Inc.
reserved.

All rights

ORACLE_SID=S1T2
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
OGG_HOME=/u01/app/ogg/10.2.0
DISPLAY=localhost:0.0
Successful Setting...
Oracle GoldenGate Command Interpreter 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 4 2011
23:54:04
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All
rights reserved.
GGSCI (edm6hp99.precisetrace.com) 1>

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-21

Oracle GoldenGate 11g: Implementers Workshop

Step 10: Start Oracle GoldenGate 11g GGSCI on Target


The Workshops is
Command-Line oridented.
This will give you an
excellent understanding of
the commands used
during the workshop.
An alternative is to use the
Graphical User Interface,
Oracle GoldenGate 11g
Director and Monitor.
Most of the command on
the workshop does not
require Database Login, as
it will be creating filebased parameter files and
adding processes to
Oracle GoldenGate 11g
instance.

Start GGSCI

Start Oracle GoldenGate 11g Software Command Interface


(GGSCI). Use the provided ora.env utility to start GGSCI.
$ ora.env 11 2 0 t 1 localhost ggsci
ora.env Utility: Release 1.2 (Beta) on Mon May 21 08:51:56 AST
2012
Copyright (c) 2008, 2012, PreciseTrace Inc.
reserved.

All rights

ORACLE_SID=T1E2
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
OGG_HOME=/u01/app/ogg/11.2.0
DISPLAY=localhost:0.0
Successful Setting...
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 11g on Oct 4 2011
23:53:33
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All
rights reserved.
GGSCI (edm6hp99.precisetrace.com) 1>

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-22

Oracle GoldenGate 11g: Implementers Workshop

Step 11: Login to Source Database


Certain Oracle Golden
Gate 11g commands
requires login to the
Database. Successful login
to the Database requires
to parameters, dblogin
and password. For
additional password
security measures, the
password can be
encrypted using Oracle
GoldenGate 11g utility.
The same encrypted
password is stored in the
configuration files of
Oracle GoldenGate 11g
Extract and Repicat
processes.

Login Using GGSCI

Use GGSCI to login to the Database.


$ ora.env 10 2 0 s 1 localhost ggsci
ora.env Utility: Release 1.2 (Beta) on Mon May 21 08:55:42
Copyright(c)2008,2012,PreciseTrace Inc.

All rights reserved.

ORACLE_SID=S1T2
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
OGG_HOME=/u01/app/ogg/10.2.0
DISPLAY=localhost:0.0
Successful Setting...
Oracle GoldenGate Command Interpreter 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 4 2011
23:54:04
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All
rights reserved.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.
GGSCI (edm6hp99.precisetrace.com) 2>

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-23

Oracle GoldenGate 11g: Implementers Workshop

Step 12: Source Database Version


The Workshop is intended
to perform Migration and
Upgrade from Oracle
Database 10g Version
10.2.0.5 to Oracle
Database 11g Version
11.2.0.3. Hence, the
Source is Oracle Database
10g and the Target is
Oracle Database 11g.
Oracle GoldenGate 11g
support lower Oracle
Database Version such as
Oracle 8i and Oracle
Database 9i. Avoiding
interim upgrade when
going from 8i or Oracle
Database 9i Release 1 to
Oracle Database 11g.

Database, OS
versions

To determine the Operating System and Database version,


login to the Database from Oracle GoldenGate 11g.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.
GGSCI (edm6hp99.precisetrace.com) 2>versions
Operating System:Linux
Version #1 SMP Thu Sep 3 02:28:20 EDT 2009, Release 2.6.18164.el5PAE
Node: edm6hp99.precisetrace.com
Machine: i686
Database:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
GGSCI (edm6hp99.precisetrace.com) 3>

The Source Oracle Database 10g Version 10.2.0.5 installed


includes the majority of Oracle Database 10g Enterprise
options.
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-24

Oracle GoldenGate 11g: Implementers Workshop

Step 13: Login to Target Database


The Workshop is intended
to perform Migration and
Upgrade from Oracle
Database 10g Version
10.2.0.5 to Oracle
Database 11g Version
11.2.0.3. Hence, the
Source is Oracle Database
10g and the Target is
Oracle Database 11g.
Oracle GoldenGate 11g
support lower Oracle
Database Version such as
Oracle 8i and Oracle
Database 9i. Avoiding
interim upgrade when
going from 8i or Oracle
Database 9i Release 1 to
Oracle Database 11g.

Login Using GGSCI

Login to the Target Database from Oracle GoldenGate 11g.


$ ora.env 11 2 0 t 1 localhost ggsci
ora.env Utility: Release 1.2 (Beta) on Mon May 21 09:05:45 AST
2012
Copyright (c) 2008, 2012, PreciseTrace Inc.
reserved.

All rights

ORACLE_SID=T1E2
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
OGG_HOME=/u01/app/ogg/11.2.0
DISPLAY=localhost:0.0
Successful Setting...
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 11g on Oct 4 2011
23:53:33
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All
rights reserved.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-25

Oracle GoldenGate 11g: Implementers Workshop

Step 14: Target Database Version


The Workshop is intended
to perform Migration and
Upgrade from Oracle
Database 10g Version
10.2.0.5 to Oracle
Database 11g Version
11.2.0.3. Hence, the
Source is Oracle Database
10g and the Target is
Oracle Database 11g.
Oracle GoldenGate 11g
support lower Oracle
Database Version such as
Oracle 8i and Oracle
Database 9i. Avoiding
interim upgrade when
going from 8i or Oracle
Database 9i Release 1 to
Oracle Database 11g.

Database, OS
versions

Verify the release and version of the Operating System and


Database.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.
GGSCI (edm6hp99.precisetrace.com) 2> versions
Operating System:
Linux
Version #1 SMP Thu Sep 3 02:28:20 EDT 2009, Release 2.6.18164.el5PAE
Node: edm6hp99.precisetrace.com
Machine: i686
Database:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
GGSCI (edm6hp99.precisetrace.com) 3>

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-26

Oracle GoldenGate 11g: Implementers Workshop

Step 15: Create Source Oracle GoldenGate 11g Sub-directories


OracleGoldenGate 11g
creates a list of directories
outside of the Database
structure. Each directory
store specific type of files.
The directory dirprm
stores the Extract and
Replicat group parameter
files.
The directory dirrpt stores
the Extract and Replicat
group lot output files.
The directory dirdat stores
initial load data, when
performing file to Replicat
technique to initiate the
Target Database.

Source Subdirectories

The location of the sub-directories is based on Oracle


GoldenGate 11g Home directory. Oracle GoldenGate 11g
commands expect the file on the default location, otherwise the
absolute path must be specified when entering the commands.
GGSCI (edmr1s35) 1> create subdirs
Creating subdirectories under current directory /u01/app/ogg/10.2.0
Parameter files
Report files
Checkpoint files
Process status files
SQL script files
Database definitions files
Extract data files
Temporary files
Veridata files
Veridata Lock files
Veridata Out-Of-Sync files
Veridata Out-Of-Sync XML files
Veridata Parameter files
Veridata Report files
Veridata Status files
Veridata Trace files
Stdout files
GGSCI (edmr1s35)

/u01/app/ogg/10.2.0/dirprm: created
/u01/app/ogg/10.2.0/dirrpt: created
/u01/app/ogg/10.2.0/dirchk: created
/u01/app/ogg/10.2.0/dirpcs: created
/u01/app/ogg/10.2.0/dirsql: created
/u01/app/ogg/10.2.0/dirdef: created
/u01/app/ogg/10.2.0/dirdat: created
/u01/app/ogg/10.2.0/dirtmp: created
/u01/app/ogg/10.2.0/dirver: created
/u01/app/ogg/10.2.0/dirver/lock: created
/u01/app/ogg/10.2.0/dirver/oos: created
/u01/app/ogg/10.2.0/dirver/oosxml: created
/u01/app/ogg/10.2.0/dirver/params: created
/u01/app/ogg/10.2.0/dirver/report: created
/u01/app/ogg/10.2.0/dirver/status: created
/u01/app/ogg/10.2.0/dirver/trace: created
/u01/app/ogg/10.2.0/dirout: created

2>

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-27

Oracle GoldenGate 11g: Implementers Workshop

Step 16: Create Target Oracle GoldenGate 11g Sub-directories


Oracle GoldenGate 11g
creates a list of directories
outside of the Database
structure. Each directory
store specific type of files.
The directory dirchk stores
the Extract and Replicat
group write/read
positions.
The directory dirdef stores
the Extract and Replicat
group redefinition files.
The directory dirpcs stores
the process id for Extract
and Replicat groups. While
dirtmp dedicated for
temporary storage.

Source Subdirectories

In case, the subdirs command already executed, the


operating system message, directory already exist returned.
GGSCI (edmr1s35) 1> create subdirs
Creating subdirectories under current directory /u01/app/ogg/11.2.0
Parameter files
Report files
Checkpoint files
Process status files
SQL script files
Database definitions files
Extract data files
Temporary files
Veridata files
Veridata Lock files
Veridata Out-Of-Sync files
Veridata Out-Of-Sync XML files
Veridata Parameter files
Veridata Report files
Veridata Status files
Veridata Trace files
Stdout files

/u01/app/ogg/11.2.0/dirprm: created
/u01/app/ogg/11.2.0/dirrpt: created
/u01/app/ogg/11.2.0/dirchk: created
/u01/app/ogg/11.2.0/dirpcs: created
/u01/app/ogg/11.2.0/dirsql: created
/u01/app/ogg/11.2.0/dirdef: created
/u01/app/ogg/11.2.0/dirdat: created
/u01/app/ogg/11.2.0/dirtmp: created
/u01/app/ogg/11.2.0/dirver: created
/u01/app/ogg/11.2.0/dirver/lock: created
/u01/app/ogg/11.2.0/dirver/oos: created
/u01/app/ogg/11.2.0/dirver/oosxml: created
/u01/app/ogg/11.2.0/dirver/params: created
/u01/app/ogg/11.2.0/dirver/report: created
/u01/app/ogg/11.2.0/dirver/status: created
/u01/app/ogg/11.2.0/dirver/trace: created
/u01/app/ogg/11.2.0/dirout: created

GGSCI (edmr1s35) 2>

To re-run the command, either execute the operating System


command rm, or de-install Oracle GoldenGate 11g using
rm R command.

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-28

Oracle GoldenGate 11g: Implementers Workshop

Step 17: Add TRANDATA on the Source Tables


In the case of missing
primary/unique key of the
table, Oracle GoldeGate
11g TRANDATA command
is used to enable tablelevel supplemental
logging.
TRANDATA command
requires successful login
to the Database, then
prefixing the table name
with schema name.
These steps need to be
scripted in case of large
number of table, or use
the wild-card feature
instead of the table
names.

TRANDATA
Command

Supplemental enable database supplemental logging,


TRANDATA GoldenGate 11g command supplement database
logging by adding metadata and supplemental logging at the table
level, so that Oracle GoldenGate 11g can perform the relevant
operation on target database for DML Database transactions.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.
GGSCI (edm6hp99.precisetrace.com) 2>add trandata
osm$repapi.customers
Logging of supplemental redo data enabled for table
OSM$REPAPI.CUSTOMERS.
GGSCI (edm6hp99.precisetrace.com) 3>add trandata
osm$repapi.policies
Logging of supplemental redo data enabled for table
OSM$REPAPI.POLICIES.
GGSCI (edm6hp99.precisetrace.com) 4>

Alternatively, use Oracle GoldenGate 11g wild-card syntax.


GGSCI (edm6hp99.precisetrace.com) 3>add trandata
osm$repapi.*
Advanced Heterogeneous Database Replication, Operational Business Intelligence,
High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-29

Oracle GoldenGate 11g: Implementers Workshop

Step 18: Add TRANDATA on the Target Tables


In the case of missing
primary/unique key of the
table, Oracle GoldeGate
11g TRANDATA command
is used to enable tablelevel supplemental
logging.
TRANDATA command
requires successful login
to the Database, then
prefixing the table name
with schema name.
These steps need to be
scripted in case of large
number of table, or use
the wild-card feature
instead of the table
names.

TRANDATA
Command

Enable table-level logging at the Target Database. This is


needed for Workshop 4, configuring Bi-Directional configuration.
GGSCI (edm6hp99.precisetrace.com) 1>dblogin userid ogg_admin,
password oracle
Successfully logged into database.
GGSCI (edm6hp99.precisetrace.com) 2>add trandata
osm$repapi.customers
Logging of supplemental redo data enabled for table
OSM$REPAPI.CUSTOMERS.
GGSCI (edm6hp99.precisetrace.com) 3>add trandata
osm$repapi.policies
Logging of supplemental redo data enabled for table
OSM$REPAPI.POLICIES.

For large number of tables, Scripting may need to be used as


shown below. Then use Oracle GoldenGate 11g OBEY command.
S1T2>
S1T2>
2>
S1T2>

spool /tmp/trandata.oby
Select add trandata osm$repapi.||table_name
from
dba_tables where owner=OSM$REPAPI;
spool off

Advanced Heterogeneous Database Replication, Operational Business Intelligence,


High-Availability and Zero-Downtime Migration and Upgrade

Copyrights 2013, PreciseTrace, Inc. | www.precisetrace.com/ebcc

1-30

You might also like