Sunteți pe pagina 1din 190

Oracle GoldenGate 11g

Fundamentals for Oracle


Activity Guide

D66519GC10
Edition 1.0
April 2011
D72292

Copyright 2011, Oracle and/or its affiliates. All rights reserved.


Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.

Author
Karen Kehn

Technical Contributors and Reviewers

Glenn Goodrich, Eric Siglin, Sue Jang, Loren Penton, Randy Richeson, Heike Hundt, Viktor
Tchemodanov, Joe Greenwald, Deirdre Matishak

This book was published using:

Oracle Tutor

Table of Contents
Practices for Lesson 1: Introduction to Oracle GoldenGate 11g: Fundamentals for Oracle .....................1-1
Practices for Lesson 1....................................................................................................................................1-2
Practices for Lesson 2: Technology Overview ..............................................................................................2-1
Practices for Lesson 2....................................................................................................................................2-2
Practices for Lesson 3: Oracle GoldenGate Architecture ............................................................................3-1
Practices for Lesson 3....................................................................................................................................3-2
Practices for Lesson 4: Installing Oracle GoldenGate ..................................................................................4-1
Practices for Lesson 4: Overview ...................................................................................................................4-2
Practice 4-1: Lab Preparation ........................................................................................................................4-3
Practice 4-2: Installing Oracle GoldenGate ....................................................................................................4-7
Practice 4-3: Introduction to the GGSCI Command Interface ........................................................................4-14
Practices for Lesson 5: Configuration Overview and Preparing the Environment ....................................5-1
Practices for Lesson 5: Overview ...................................................................................................................5-2
Practice 5-1: Preparing Your Environment .....................................................................................................5-3
Practice 5-2: Creating the GLOBALS Parameter File ....................................................................................5-9
Practice 5-3: Configuring and Starting the GoldenGate Manager ..................................................................5-10
Practice 5-4: Using the TRANDATA option ....................................................................................................5-13
Practices for Lesson 6: Configuring Change Capture ..................................................................................6-1
Practices for Lesson 6: Overview ...................................................................................................................6-2
Practice 6-1: Setting Up the Extract and the EXTTRAIL .....................................................6-3
Practice 6-2: Setting Up an Extract Data Pump and Starting the Two Extracts .............................................6-5
Practices for Lesson 7: Configuring Initial Load...........................................................................................7-1
Practices for Lesson 7: Overview ...................................................................................................................7-2
Practice 7-1: Setting Up the Initial Load by Using the File to Replicat Method ...............................................7-3
Practice 7-2: Setting Up the Initial Data Load by Using the Direct Load Method ...........................................7-10
Practices for Lesson 8: Configuring Change Delivery .................................................................................8-1
Practices for Lesson 8: Overview ...................................................................................................................8-2
Practice 8-1: Setting Up the Checkpoint Table on the Target System ...........................................................8-3
Practice 8-2: Setting Up GoldenGate Delivery ...............................................................................................8-4
Practice 8-3: Generating Data and Starting GoldenGate Processes..............................................................8-6
Practices for Lesson 9: Extract Trail and Files..............................................................................................9-1
Practices for Lesson 9: Overview ...................................................................................................................9-2
Practice 9-1: Using the Logdump Utility .........................................................................................................9-3
Practices for Lesson 10: Oracle GoldenGate Parameters ............................................................................10-1
Practices for Lesson 10: Overview .................................................................................................................10-2
Practice 10-1: Modifying Source Manager Parameters ..................................................................................10-3
Practice 10-2: Modifying the Target Manager Parameters .............................................................................10-5
Practice 10-3: Modifying the Extract Parameters on the Source Database....................................................10-7
Practices for Lesson 11: Data Selection and Filtering..................................................................................11-1
Practices for Lesson 11..................................................................................................................................11-2
Practices for Lesson 12: Additional Transformation Topics........................................................................12-1
Practices for Lesson 12: Overview .................................................................................................................12-2
Practice 12-1: Modifying an Existing Set of Macros and User Tokens ...........................................................12-3
Practices for Lesson 13: Configuration Options ...........................................................................................13-1
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Oracle GoldenGate 11g Fundamentals for Oracle Table of Contents


i

Practices for Lesson 13: Overview .................................................................................................................13-2


Practice 13-1: Setting Up the Database and Source Definitions File .............................................................13-3
Practice 13-2: GoldenGate Encryption ...........................................................................................................13-7
Practices for Lesson 14: Bidirectional Replication .......................................................................................14-1
Practices for Lesson 14: Overview .................................................................................................................14-2
Practice 14-1: Two-Way Active-Active Data Replication ................................................................................14-3
Practice 14-2: Conflict Detection and Resolution ...........................................................................................14-21
Practices for Lesson 15: DDL Replication .....................................................................................................15-1
Practices for Lesson 15: Overview .................................................................................................................15-2
Practice 15-1: DDL Replication ......................................................................................................................15-3
Practices for Lesson 16: Tuning and Troubleshooting ................................................................................16-1
Practices for Lesson 16..................................................................................................................................16-2

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Oracle GoldenGate 11g Fundamentals for Oracle Table of Contents


ii

Preface
Profile

Before you begin this course, you should have working experience with the vi editor, database
concepts and data integration concepts.

How This Course Is Organized


This is an instructor-led course featuring lecture and hands-on exercises. Online demonstrations
and written practice sessions reinforce the concepts and skills introduced.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Oracle GoldenGate 11g Fundamentals for Oracle Table of Contents


iii

Related Publications
Oracle Publications
Title
Oracle GoldenGate Windows and UNIX Administrators Guide
11g Release 1 (11.1.1)
Oracle GoldenGate Windows and UNIX Reference Guide 11g
Release 1 (11.1.1)
Oracle GoldenGate Windows and UNIX Troubleshooting and
Tuning Guide 11g Release 1 (11.1.1)

Part Number
E17341-01
E17791-01
E17792-01

Additional Publications

System release bulletins


Installation and users guides
Read-me files
International Oracle Users Group (IOUG) articles
Oracle Magazine

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Oracle GoldenGate 11g Fundamentals for Oracle Table of Contents


iv

Practices for Lesson 1:


Introduction to Oracle
GoldenGate 11g:
Fundamentals for Oracle
Chapter 1

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction to Oracle GoldenGate 11g: Fundamentals for Oracle
Chapter 1 - Page 1

Practices for Lesson 1


Overview
There are no practices for this Lesson.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction to Oracle GoldenGate 11g: Fundamentals for Oracle
Chapter 1 - Page 2

Practices for Lesson 2:


Technology Overview
Chapter 2

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2: Technology Overview


Chapter 2 - Page 1

Practices for Lesson 2


Overview
There are no practices for this Lesson.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2: Technology Overview


Chapter 2 - Page 2

Practices for Lesson 3:


Oracle GoldenGate
Architecture
Chapter 3

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Oracle GoldenGate Architecture


Chapter 3 - Page 1

Practices for Lesson 3


Overview
There are no practices for this Lesson.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Oracle GoldenGate Architecture


Chapter 3 - Page 2

Practices for Lesson 4:


Installing Oracle GoldenGate
Chapter 4

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 1

Practices for Lesson 4: Overview


Practices Overview
In these practices, you will become familiar with the lab environment that you will be using for
the duration of the class. You will also install the GoldenGate software to be used with both the
AMER and EURO databases. Finally, you will be introduced briefly to the command line
interface, GGSCI.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 2

Practice 4-1: Lab Preparation


Overview
There are two databases configured on your machine. One is called AMER and the other is
called EURO. These are physically different databases, each with its own structure and set of
users. At some times in the practices that follow you will need to connect to one of your
databases using SQL*Plus. The following steps describe how to connect to each of your
databases and also provide more details about the users and tables that you will be working
with.
Each database has administrative users, such as system, as well as other users created
specifically for this course. The data tables that you will create and populate in the AMER
database that you will be using in this course are owned by the WEST user. Conversely, the data
tables in the EURO database are owned by the EAST user.
To connect to the AMER database as the system user using SQL*Plus, enter the following
command at the operating system prompt:
Shell> sqlplus system@amer
The password for all database accounts for this course is oracle_4U.
Operating System
Type

Linux

<userid>

oracle

<password>

oracle

AMER Database (Source)


<login>

west

<password>

oracle_4U

<oracle_sid>

amer

<GG_AMER_HOME>

/u01/app/oracle/gg_amer

Manager <port>

15000

EURO Database (Target)


<login>

east

<password>

oracle_4U

<oracle_sid>

euro
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 3

<GG_EURO_HOME>

/u01/app/oracle/gg_euro

Manager <port>

15001

GoldenGate

1.

<software location>

/stage

GoldenGate <install location - source>

u01/app/oracle/gg_amer

GoldenGate <install location - target>

u01/app/oracle/gg_euro

To set up your working environment, create terminal windows to make it easier to navigate
between the source and target databases:
a. Log in to your designated machine with the following information:
1) Username: oracle

2.

2) Password: oracle
Double-click the terminal icon located on your desktop.

3.

From the Terminal menu, select Set Title.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 4

4.

Set the name of the terminal window to GG_AMER_HOME and navigate to the
$GG_AMER_HOME directory (this is where the GoldenGate software will be installed).

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 5

5.

Create another terminal window for the euro database, naming it GG_EURO_HOME following
the same steps above. Navigate to the $GG_EURO_HOME directory (this is the directory
where GoldenGate will be installed). For many of the practices, keep both of these windows
open, to easily toggle between the two databases.
(Note: It is important to confirm that you are using the correct SID by issuing the .
oraenv command, AMER and EURO, respectively.)

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 6

Practice 4-2: Installing Oracle GoldenGate


Overview
In this practice, you will install two Oracle GoldenGate instance(s), one to be used with the
AMER database and one to be used with the EURO database.

Tasks
1.

In the GG_AMER_HOME terminal window, unzip the .zip file by executing the following
command:
Shell> unzip ggs*.zip

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 7

2.

Extract the .tar file into the same (gg_amer) directory:


Shell> tar xvof *.tar

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 8

3.

Create the required subdirectories in the installation directory:


Shell> ggsci
GGSCI> create subdirs
GGSCI> exit

4.

The GGSCI CREATE SUBDIRS command creates the following GoldenGate subdirectories:
Directory

Contents
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 9

dirchk
dirdat
dirdef
dirpcs
dirout
dirprm
dirrpt
dirsql
dirtmp
dirver
5.

GoldenGate checkpoint files


GoldenGate trail and extract files
Source data definitions produced by DEFGEN and used to translate
heterogeneous data
Process status files
Directory that is no longer used
GoldenGate parameter (run-time configuration) files
Process report files
SQL scripts
Temporary storage for transactions that exceed memory
An Oracle GoldenGate Veridata directory. Not used unless this
software is installed in the Oracle GoldenGate location.

Verify that the GoldenGate directories were created:


Shell> ls d dir*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 10

6.

Now install the GoldenGate software in the GG_EURO_HOME directory. In the


GG_EURO_HOME terminal window, unzip the .zip file by executing the following
command:
Shell> unzip ggs*.zip

7.

Extract the .tar file into the same (gg_euro) directory:


Shell> tar xvof *.tar

8.

Create the required subdirectories in the installation directory:


Shell> ggsci
GGSCI> create subdirs
GGSCI> exit

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 11

9.

The GGSCI CREATE SUBDIRS command creates the following GoldenGate subdirectories:
Directory
dirchk
dirdat
dirdef
dirpcs
dirout
dirprm
dirrpt
dirsql
dirtmp
dirver

Contents
GoldenGate checkpoint files
GoldenGate trail and extract files
Source data definitions produced by DEFGEN and used to translate
heterogeneous data
Process status files
Directory that is no longer used
GoldenGate parameter (run-time configuration) files
Process report files
SQL scripts
Temporary storage for transactions that exceed memory
An Oracle GoldenGate Veridata directory. Not used unless this
software is installed in the Oracle GoldenGate location.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 12

10. Verify that the GoldenGate directories were created:


Shell> ls d dir*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 13

Practice 4-3: Introduction to the GGSCI Command Interface


Overview

In this practice you learn how to invoke the GoldenGate command interface (GGSCI) and how to
access online help for all commands.

Assumptions
This can be done using either the AMER database or the EURO database.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 14

Tasks
1.

How you invoke GGSCI depends on the settings in your profile. From the /home/oracle
directory, review the .bash_profile file. Make certain that the ORACLE_HOME and
GG_AMER_HOME, GG_EURO_HOME system environment variables are set to the correct
directories. The GoldenGate processes refer to them when connecting to the database. If
the appropriate settings have been included, you can invoke GGSCI directly from the
command line.

2.

Launch the GGSCI command interface:


Shell> cd <install location>
Shell> . oraenv
Shell> ggsci

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 15

3.

View a HELP summary for all commands:


GGSCI> HELP
GGSCI> HELP ALL

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 16

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 17

4.

View a HELP summary for a command or entity (some of the screenshots are too long to
include):
GGSCI> HELP ADD EXTRACT
GGSCI> HELP ADD EXTTRAIL

5.

View your command history:


GGSCI> HISTORY

6.

View a brief informational summary of all processes:


GGSCI> INFO ALL

7.

Exit GGSCI.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Installing Oracle GoldenGate


Chapter 4 - Page 18

Practices for Lesson 5:


Configuration Overview and
Preparing the Environment
Chapter 5

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 1

Practices for Lesson 5: Overview


Practices Overview
In these practices, you will begin the process of setting up one-way data replication by creating
and populating your databases. You will also configure and start the manager process on both
instances of GoldenGate. Oracle GoldenGate provides log-based change data capture (CDC)
and replication of committed database transactions. The software provides capture, routing,
transformation, and delivery of transactional data across heterogeneous environments in real
time.
The following figure depicts a simplified GoldenGate implementation that you will create. In this
practice, you will create the objects that are shaded (source database, target database and
mgr.prm files):

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 2

Practice 5-1: Preparing Your Environment


Overview
In this practice you will set up the databases (AMER and EURO) and configure GoldenGate to
work specifically with the Oracle databases.

Assumptions
Two core databases are already installed, AMER and EURO. AMER (the source database) has the
following user (west/oracle_4U) already created and EURO has the following user
(east/oracle_4U) also already created. You will be running the source_database.sql
script on the AMER database and the target_database.sql script on the EURO database.
Both of these scripts will create the following tables:

ACCOUNT

ACCOUNT_TRANS

BRANCH

TELLER

TELLER_TRANS

BRANCH_ATM
The data tables in the AMER database are owned by the WEST user and the data tables in the
EURO database are owned by the EAST user.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 3

Tasks
1.

To create the source database for AMER, navigate to the


/home/oracle/labs/Section5/sqlscripts directory. At the shell prompt, issue the
following command:
Shell> sqlplus west/oracle_4U @source_database.sql

2.

To populate the tables on the AMER database, run the following command from the same
directory (/home/oracle/labs/Section5/sqlscripts):
Shell> sqlplus west/oracle_4U @seed_database.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 4

3.

To create the data tables on the EURO database, in the GG_EURO_HOME terminal window,
navigate to the /home/oracle/labs/Section5/sqlscripts directory. Execute the
following command:
Shell> sqlplus east/oracle_4U @target_database.sql

4.

Create a GoldenGate user that can connect to the source and target databases for
transactional data. A GoldenGate user requires a database user with the following
privileges:
User Privilege

Extract (Source Side)

Replicat (Target Side)

CREATE SESSION, ALTER


SESSION

RESOURCE

SELECT ANY DICTIONARY

FLASHBACK ANY TABLE

or
FLASHBACK ON
<owner.table>
SELECT ANY TABLE
or
SELECT ON <owner.table>

INSERT, UPDATE, DELETE


ON <target tables>

CREATE TABLE

EXECUTE on
DBMS_FLASHBACK package

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 5

5.

Create a user, (gguser/oracle_4U), on both the AMER and EURO databases:


Shell> sqlplus / as sysdba
SQL> grant connect, resource, dba to gguser identified by
oracle_4U;
SQL> exit
For the AMER database:

For the EURO database:

6.

Exit SQL.
On the AMER database, log out of SQL and log back in with the new user, gguser. Minimal
supplemental logging must be enabled at the database level to allow GoldenGate to
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 6

properly capture updates to primary keys and chained rows. To enable supplemental
logging at the database level:
a. Log in to SQL*Plus as gguser/oracle_4U.
b. Enable minimal supplemental logging by executing the following command:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
c.

To ensure that the redo and archive logs contain supplemental log data, switch the
logs by executing the following command:
ALTER SYSTEM SWITCH LOGFILE;

d.

Verify that supplemental logging is enabled at the database level via the following
command. (Note: Output of the query must be YES or IMPLICIT.)
SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;

7.

Exit SQL.
On the EURO database, log out of SQL and log back in with the new user, gguser. Minimal
supplemental logging must be enabled at the database level to allow GoldenGate to
properly capture updates to primary keys and chained rows. To enable supplemental
logging at the database level:
a. Log in to SQL*Plus as gguser/oracle_4U.
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 7

b.

Enable minimal supplemental logging by executing the following command:


ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

c.

To ensure that the redo and archive logs contain supplemental log data, switch the
logs by executing the following command:
ALTER SYSTEM SWITCH LOGFILE;

d.

Verify that supplemental logging is enabled at the database level via the following
command. (Note: Output of the query must be YES or IMPLICIT.)
SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;
Exit SQL.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 8

Practice 5-2: Creating the GLOBALS Parameter File


Overview
On the target side, Replicat checkpoints to a table in the database that is defined in a special
parameter file named GLOBALS. In this practice you will create a GLOBALS parameter file
located on the target database (EURO).

Tasks
1.

In the GG_EURO_HOME terminal window, create a GLOBALS parameter file by executing the
following commands:
Shell> cd $GG_EURO_HOME
Shell> . oraenv
Shell> vi GLOBALS

2.

vi starts and opens a GLOBALS file, the file is located in the directory of your GoldenGate
instance. Add the following run-time parameters to the file:
checkpointtable GGS_CHECKPOINT

3.

Save and close the file.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 9

Practice 5-3: Configuring and Starting the GoldenGate Manager


Overview
In this practice, you will configure and start the manager process on both instances of
GoldenGate. The GoldenGate Manager process performs several important tasks that we must
configure:

Listens for incoming connectivity requests from Extract or Extract Data Pump

Performs housekeeping functions to delete any consumed GoldenGate Trails

Tasks
1.

The first task is to configure and start the Manager processes on both the source and
target. On the source server (AMER), start GGSCI from a shell prompt positioned inside the
GoldenGate directory.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 10

At the GGSCI prompt, enter:


edit param mgr

2.

vi starts and opens an mgr.prm file. Add the following run-time parameters to the
mgr.prm file:
PORT 15000
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

3.

4.

Using the GoldenGate Reference Manual (gg_wux_ref_11_1_1.pdf) located in the


/home/oracle/labs/docs directory, what parameter is used to specify ports that
Manager can allocate for dynamic communications?
a. Add that parameter to the mgr.prm file, defining the dynamicportlist range to be
15010 through 15020.
b. Save and close the file.
At the GGSCI prompt, start the Manager process by entering the command:
start mgr
To view the status of the Manager process, enter this command:
info manager

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 11

5.

On the EURO instance, from the shell prompt positioned inside the GoldenGate directory,
invoke GGSCI. Execute the following command:
GGSCI> edit params mgr
Add the following run-time parameters to the mgr.prm file:
PORT 15001
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

6.

Save and close the file


At the GGSCI prompt, start the Manager process by entering the following command:
start mgr
To view the status of the Manager process, enter this command:
info manager

Exit GGSCI.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 12

Practice 5-4: Using the TRANDATA option


Overview
In this practice, you will enable supplemental logging on the source database for the specified
tables. Before you can start capturing real-time data, the Oracle database must be set to log the
table key values whenever it logs a rows change, so they are available to GoldenGate in Redo.
By default, the database only logs column values that change. This is required so GoldenGate
can locate the correct row on the target for update and delete operations.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 13

Tasks
1.

In the GG_AMER_HOME terminal window (the source server), at the GGSCI prompt, type the
following:
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>

dblogin userid gguser, password oracle_4U


add trandata west.account
add trandata west.account_trans
add trandata west.branch
add trandata west.branch_atm
add trandata west.teller
add trandata west.teller_trans

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 14

2.

Execute the following GGSCI command to verify that supplemental logging is enabled on
each table:
info trandata west.*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 15

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Configuration Overview and Preparing the Environment


Chapter 5 - Page 16

Practices for Lesson 6:


Configuring Change Capture
Chapter 6

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 1

Practices for Lesson 6: Overview


Practices Overview
In these practices, you will set up the Extract on the source (AMER) database, the EXTTRAIL,
Data Pump Extract and the RMTTRAIL.
The following diagram shows new objects that will be created: Extract, EXTTRAIL, Data Pump
Extract, and RMTTRAIL.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 2

Practice 6-1: Setting Up the Extract and the EXTTRAIL


Overview
In this practice you perform the following:

Configure the primary Extract process that will capture changes.


Add the local trail that will store these changes.

Tasks
1.

On the source server (GG_AMER_HOME terminal window), configure the change data
capture extract from the GGSCI prompt by executing the edit command (confirm that you
are in the installation directory and using AMER SID):
Shell>
Shell>
Shell>
GGSCI>

$GG_AMER_HOME
. oraenv
ggsci
edit param extwest

vi starts and opens the extwest.prm file. Add the following run-time parameters to the
text file:
EXTRACT extwest
EXTTRAIL ./dirdat/ew
USERID gguser, PASSWORD oracle_4U
TABLE west.*;
Using the GoldenGate Reference Manual (gg_wux_ref_11_1_1.pdf file) located in
the /home/oracle/labs/docs directory, find the parameters that perform the
following and add them to the extwest.prm file before the TABLE listings:

Controls whether or not statistics generated by the REPORT parameter are reset when
a new process report is created

Generates interim run-time statistics in a process report. Set this parameter to report at
1 minute after midnight daily.

Force report files to age on a regular schedule, instead of when a process starts. Set
this report roll-over parameter to occur at 1 minute after midnight daily.

Report a count of transaction records processed since startup. Set this report
parameter to occur every 60 seconds, and report the number of operations per second
and the change in rate.
Save and close the file.
Add the Extract Group by executing the following GGSCI commands:

2.

add extract extwest, tranlog, begin now


This adds the extwest Extract to GoldenGate, specifying that it will read from Oracle
Redo/Archive, with an initial Redo checkpoint of the current timestamp.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 3

3.

Add a local extract trail, with a maximum file size of 50 megabytes per trail, that links the
trail to the extwest Extract:
add exttrail ./dirdat/ew, extract extwest, megabytes 50
This adds the ./dirdat/ew local extract trail, with a maximum file size of 50
megabytes per trail, and links the trail to the extwest Extract. When the Extract is
started, the ./dirdat/ew000000 file will be created. When that file is full, trail
ew000001 will be created, and so on through ew999999.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 4

Practice 6-2: Setting Up an Extract Data Pump and Starting the Two
Extracts
Overview
In this practice you perform the following:

Configure a data pump Extract to read the local trail and create a remote trail on the
target.

Add the remote trail.

Start the two Extract processes.

Tasks
1.

At the GGSCI prompt on the source server (GG_AMER_HOME terminal window), configure
the Extract Data Pump to read from the./dirdat/ew local extract trail, transmit the data
to the target server (EURO), and write it to the./dirdat/pe remote trail:
edit param pwest

2.

vi starts and opens the pwest.prm file. Add the following run-time parameters to the text
file:
EXTRACT pwest
RMTHOST <hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/pe
PASSTHRU
TABLE west.*;

Save and close the file.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 5

3.

Add the Extract Group by executing the following GGSCI commands:


add extract pwest, exttrailsource ./dirdat/ew
add rmttrail ./dirdat/pe, extract pwest, megabytes 50

4.

Start the primary Extract process, extwest, by issuing the following command in the
GG_AMER_HOME window:
GGSCI> start extract extwest

5.

Start the Data Pump Extract process, PWEST, by issuing the following command in the
GG_AMER_HOME window:
GGSCI> start extract pwest

6.

To verify the status, execute the command:


GGSCI> info er *

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 6

Both processes should display as RUNNING. If you see either STOPPED or


ABENDED, view the report log (view report <extract name>), fix the error, and
restart the process.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 7

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Configuring Change Capture


Chapter 6 - Page 8

Practices for Lesson 7:


Configuring Initial Load
Chapter 7

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 1

Practices for Lesson 7: Overview


Practices Overview
In these practices, you will set up the initial load of data using two different methods: File to
Replicat and Direct Load.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 2

Practice 7-1: Setting Up the Initial Load by Using the File to Replicat
Method
Overview
In this practice you will:

Configure a task to load the initial data from two source tables: ACCOUNT and BRANCH

Configure the delivery of the data to the target

Execute the initial load of data


This File to Replicat method uses an Extract process to extract source data into flat files or trails
on the target system. The initial load Replicat task then moves the data from the intermediate
file to the target database.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 3

Tasks
1.

Configure the initial load Extract parameter file by executing the following commands on the
source (GG_AMER_HOME terminal window) system to create an Extract named EFTOR:
Shell> ggsci
GGSCI> EDIT PARAMS EFTOR
vi starts and opens the eftor.prm file. Add the following run-time parameters to the
text file:
SOURCEISTABLE
USERID gguser, PASSWORD oracle_4U
RMTHOST <hostname>, MGRPORT 15001
RMTFILE ./dirdat/ACCOUNT.DAT, PURGE
TABLE west.account;
RMTFILE ./dirdat/BRANCH.DAT, PURGE
TABLE west.branch;

2.

Save and close the file. Exit GGSCI.


Execute the initial load capture process by starting the initial load Extract directly from a
shell by using the following command:
Shell> cd <install location>
Shell> extract paramfile dirprm/eftor.prm reportfile
dirrpt/eftor.rpt

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 4

3.

To view the report, navigate to the dirrpt directory and execute the following command:
Shell> cd dirrpt
GGSCI> more eftor.rpt

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 5

4.

Navigate towards the end of the report to view the number of inserts for the ACCOUNT and
BRANCH tables (your results may vary):

5.

Configure the initial load delivery parameter file by executing the following commands on
the target (GG_EURO_HOME terminal window) system.
a. Navigate to the GG_EURO_HOME directory. Configure the data load parameters for
ACCOUNT by executing the following command at GGSCI:
Shell> cd $GG_EURO_HOME
Shell> ggsci
GGSCI> EDIT PARAMS LACCT
vi starts and opens the lacct.prm file. Add the following run-time parameters to the
text file:
SPECIALRUN
END RUNTIME
USERID gguser, PASSWORD oracle_4U
ASSUMETARGETDEFS
EXTFILE ./dirdat/ACCOUNT.DAT
MAP west.ACCOUNT, TARGET east.ACCOUNT;
Save the file.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 6

b.

Repeat this process for the BRANCH initial load parameter file:
GGSCI> EDIT PARAMS LBRANCH
vi starts and opens the lbranch.prm file. Add the following run-time parameters to the
text file:
SPECIALRUN
END RUNTIME
USERID gguser, PASSWORD oracle_4U
ASSUMETARGETDEFS
EXTFILE ./dirdat/BRANCH.DAT
MAP west.BRANCH, TARGET east.BRANCH;
Save the file.

6.

c. Exit GGSCI.
Execute the initial load delivery process by executing the following commands at the shell
prompt from the installation directory:
Shell> replicat paramfile dirprm/lacct.prm reportfile
dirrpt/lacct.rpt
Shell> replicat paramfile dirprm/lbranch.prm reportfile
dirrpt/lbranch.rpt

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 7

Wait 10 seconds and then verify the results:


Shell> cd dirrpt
Shell> more lacct.rpt
Shell> more lbranch.rpt
Results from the lacct.rpt:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 8

Results from lbranch.rpt:

The numbers should match.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 9

Practice 7-2: Setting Up the Initial Data Load by Using the Direct Load
Method
Overview
In this practice you will:

Configure a task to load the initial data from all of the source table(s)
Configure the delivery of the data to the target

Assumptions
For this practice, target database instantiation will be performed via GoldenGate tasks. An
Extract Task is a special process that, once started, reads from each source table row by row.
This data is transmitted to the Replicat task on the target that inserts each row of data into the
empty database tables. The Task will automatically shut down once all rows are read,
transmitted, and inserted.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 10

Tasks
1.

Truncate the ACCOUNT and BRANCH tables. Note: This exercise assumes that you have
completed an initial data load using the File to Replicat method. If this is not the case, you
may skip to step 2.
Execute the following commands on the target system (GG_EURO_HOME terminal
window):
Shell> sqlplus east/oracle_4U
SQL> truncate table account;
SQL> truncate table branch;
SQL> commit;
SQL> exit

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 11

2.

To add the initial load capture batch task group, at the GGSCI prompt on the source
database (GG_AMER_HOME terminal window) in the installation directory, execute the
following command:
Shell> cd $GG_AMER_HOME
Shell> ggsci
GGSCI> add extract EINI, SOURCEISTABLE

3.

Configure the initial load capture parameter file by executing the following command on the
source system (GG_AMER_HOME terminal window):
GGSCI> EDIT PARAMS EINI
vi starts and opens the eini.prm file. Add the following run-time parameters to the
text file:
EXTRACT EINI
RMTHOST <hostname>, MGRPORT 15001
RMTTASK Replicat, GROUP RINI
USERID gguser, PASSWORD oracle_4U
TABLE west.*;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 12

4.

Save and close the file.


Add the initial load delivery batch task by executing the following command on the target
system (GG_EURO_HOME terminal window):
Shell> cd $GG_EURO_HOME
Shell> ggsci
GGSCI> add replicat RINI, SPECIALRUN

5.

Configure the initial load delivery parameter file by executing the following command on the
target system (GG_EURO_HOME terminal window):
GGSCI>

edit params RINI

vi starts and opens the rini.prm file. Add the following run-time parameters to the
text file:
REPLICAT RINI
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 13

ASSUMETARGETDEFS
USERID gguser, PASSWORD oracle_4U
DISCARDFILE ./dirrpt/RINI.dsc, PURGE
MAP west.*, TARGET east.*;
Note: In the MAP statement, the first owner/schema is for the source and the second is
for the target.

6.

Execute the initial load process on the source system (GG_AMER_HOME terminal window):
GGSCI> START EXTRACT EINI

Exit GGSCI.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 14

7.

On the target system (GG_EURO_HOME terminal window), view the report by executing the
following command:
GGSCI> view report rini

Exit GGSCI.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 15

8.

Return to the GG_AMER_HOME terminal window and verify that the count for the tables
match (the numbers should match in both databases):

Exit SQL.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: Configuring Initial Load


Chapter 7 - Page 16

Practices for Lesson 8:


Configuring Change Delivery
Chapter 8

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 1

Practices for Lesson 8: Overview


Practices Overview
In these practices, you will configure change delivery. The components of change delivery
include:

Setting up the checkpoint table on the target system

Creating a named group that includes the Replicat process and the checkpoint tables
Configuring the Replicat group by adding parameters

Starting the Replicat group


Generating database activity and verifying the results

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 2

Practice 8-1: Setting Up the Checkpoint Table on the Target System


Overview
In this practice, you will create a checkpoint table on the target system.

Assumptions
Replicat checkpoints to this table in the database and ensures that the Replicat checkpoint is
part of the transaction and is used to ensure data integrity. For this step, you will create a
special table on the target server.

Tasks
1.

To create the Checkpoint Table, on the target server (GG_EURO_HOME terminal window),
from the installation director, invoke GGSCI and execute the following command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add checkpointtable

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 3

Practice 8-2: Setting Up GoldenGate Delivery


Overview
In this practice you will set up the Replicat delivery component.

Tasks
1.

On the target server (GG_EURO_HOME terminal window), invoke GGSCI and execute the
following command:
GGSCI> edit param reast
vi starts and opens the reast.prm file. Add the following run-time parameters to the
text file:
REPLICAT REAST
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/reast.dsc, PURGE
--HANDLECOLLISIONS
--END RUNTIME
USERID gguser, PASSWORD oracle_4U
MAP west.*, TARGET east.*;

2.

Save and close the file.


Add the Replicat by executing the following GGSCI command:
add replicat reast, exttrail ./dirdat/pe

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 4

3.

Start the Replicat process and then verify the results:


GGSCI> start replicat reast
GGSCI> info replicat reast

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 5

Practice 8-3: Generating Data and Starting GoldenGate Processes


Overview
In this practice you will start the data generation process and begin real-time data capture.

Assumptions
For the accounts created when we created the database, random transactions are executed:
point of sale debit card transactions, ATM deposits, ATM withdrawals, deposits with branch
tellers, and withdrawals at branch tellers. Another script that will be used simulates a real-time
banking system.

Tasks
1.

In the GG_AMER_HOME terminal window, navigate to the installation directory and invoke
GGSCI. View the status of the EXTWEST Extract and the PWEST Data Pump Extract:
Shell> cd $GG_AMER_HOME
Shell> ggsci
GGSCI> info er *
Notice the RBA numbers for both of the Extracts:

2.

Open a new terminal window and navigate to the $GG_AMER_HOME directory. Execute the
. oraenv command to ensure that you are using the AMER database.
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 6

Shell> cd $GG_AMER_HOME
Shell> . oraenv
Then navigate to the /home/oracle/labs/Section8/sqlscripts directory.

Run the transaction generator by executing the following command:


Shell> sqlplus west/oracle_4U @trans_generator.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 7

3.

Return to your GG_AMER_HOME terminal window and verify the results (Note: The RBA
numbers should be increasing.):

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 8

4.

In the GG_EURO_HOME terminal window, view the Replicat statistics by executing the
following command:
GGSCI> info er *

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 9

5.

In the GG_AMER_HOME terminal window, issue the info extwest command again. When
the RBA value reported for Log Read Checkpoint no longer changes, Extract has captured
all outstanding Redo records:

If there is Oracle Redo activity, the RBA value will continue to change, because Extract
must read Redo even if it has no data to capture. Execute the following GGSCI
command:
GGSCI> lag ewest

6.

When Extract returns At EOF, no more records to process, Extract has captured all
outstanding redo records. Exit GGSCI.
Start a sqlplus session for the west schema at a Linux shell by executing the following
command:
Shell> sqlplus west/oracle_4U
Get the row counts for the following tables (select count(*) from <table>):

ACCOUNT

ACCOUNT_TRANS

TELLER_TRANS

BRANCH_ATM

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 10

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 11

7.

In the GG_EURO_HOME terminal window, issue the following command:


GGSCI> info reast
When the RBA value reported for Log Read Checkpoint no longer changes, Replicat has
processed all records:

8.

Exit GGSCI.
Start a sqlplus session for the east schema at a Linux shell by executing the following
command:
Shell> sqlplus east/oracle_4U
Get the row counts for the following tables (select count(*) from <table>):

ACCOUNT

ACCOUNT_TRANS

TELLER_TRANS

BRANCH_ATM

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 12

If the row counts match those returned for the source tables, you have successfully
completed this practice. Exit SQL.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 13

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Configuring Change Delivery


Chapter 8 - Page 14

Practices for Lesson 9:


Extract Trail and Files
Chapter 9

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 1

Practices for Lesson 9: Overview


Practices Overview
In these practices, you will be able to use the Logdump utility to look at records in a GoldenGate
trail file.
In this exercise you will:

Identify the file header record

Identify the trail record and its header area


Use the header and detail attributes when displaying a record

Use the Logdump help feature

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 2

Practice 9-1: Using the Logdump Utility


Tasks
1.

In the GG_AMER_HOME terminal window, navigate to the installation directory and invoke
Logdump:
Shell> cd <install location>
Shell> logdump
Logdump> help
Issue the help command to display a list of all commands available in Logdump:

2.

Open the <install_path>/dirdat/<trail id>000000 trail file (verify the name of


the trail file in the dirdat directory):
LOGDUMP> exit
Shell> cd dirdat
Shell> ls
LOGDUMP> open dirdat/ew00000

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 3

Identifying the File Headers


3. View the first record:
LOGDUMP> n

4.

Note that this is the trail file header record.


Turn on the FILEHEADER ON option and view the record again:
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 4

LOGDUMP> fileheader on
LOGDUMP> pos 0
LOGDUMP> n
Scroll down and notice how you can view the detail on the trail, the machine being used,
the Extract that produced the trail, the database information, etc.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 5

Using the Head and Detail Attributes When Displaying a Record


5. View the first next record:
LOGDUMP> n
This is standard trail record:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 6

6.

Position back to RBA 0 in the file, set the header and detail attributes to on, and view the
same record again.
LOGDUMP>
LOGDUMP>
LOGDUMP>
LOGDUMP>
LOGDUMP>

pos 0
ghdr on
detail on
n
n

Note the difference in the display from the output in the last step (the trail record header
area and detail on the columns has been added to the display):

7.

Exit Logdump.
For more information on the Logdump utility, which reference manual would you use?

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 7

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Extract Trail and Files


Chapter 9 - Page 8

Practices for Lesson 10:


Oracle GoldenGate
Parameters
Chapter 10

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 1

Practices for Lesson 10: Overview


Practices Overview
In this practice, you will modify the existing Manager and Extract processes by using more
advanced parameters.
During this practice, you will:

Modify the source system Manager parameters

Modify the target system Manager parameters


Modify the Extract parameters and restart the Extract process

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 2

Practice 10-1: Modifying Source Manager Parameters


Tasks
1.

Following the instructions in the GoldenGate documentation


(/home/oracle/labs/docs), modify the Manager parameter file on the source
database (GG_AMER_HOME terminal window) with the following parameters:
edit params mgr

Have an Extract group automatically start when the Manager process started.
_______________________________________________________________

Have all Extract groups automatically restart after abending. Manager should retry the
operation 3 times, waiting 1 minute between each attempt.
_______________________________________________________________

Report the current lag for each Extract/Replicat group every hour to the application log
file.
_______________________________________________________________
Write an informational message to the application log file if the lag for any
Extract/Replicat group exceeds 30 minutes.
_______________________________________________________________

Write a critical message to the application log file if the lag for any Extract/ Replicat
group exceeds 45 minutes.
_______________________________________________________________
Activate the changes by stopping and restarting the Manager process:

2.

GGSCI> stop mgr


GGSCI> start mgr

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 3

3.

Verify that the Manager has started:


GGSCI> info mgr

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 4

Practice 10-2: Modifying the Target Manager Parameters


Tasks
1.

Following the instructions in the GoldenGate documentation, modify the Manager


parameter file on the target database (GG_EURO_HOME terminal window) with the following
parameters:
edit params mgr

Have all Replicat groups automatically restart after abending. Manager should retry the
operation 3 times, waiting 1 minute between each attempt.
_______________________________________________________________

Delete the remote trail files after the Replicat has finished processing them and the trail
has been kept for at least 2 hours.
_______________________________________________________________
Report the current lag for each Extract/Replicat group every hour to the application log
file.
_______________________________________________________________

2.

Use ports in the range of 7820 through 7840 when starting GoldenGate processes.
_______________________________________________________________
Have all Replicat groups that have a group name of R* automatically start when the
Manager process is started.
_______________________________________________________________

Write an informational message to the application log file if the lag for any
Extract/Replicat group exceeds 30 minutes.
_______________________________________________________________

Write a critical message to the application log file if the lag for any Extract/ Replicat
group exceeds 45 minutes.
_______________________________________________________________

Activate the changes by stopping and restarting the Manager to activate the changes:
GGSCI> stop mgr
GGSCI> start mgr

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 5

3.

Verify that the Manager has started:


GGSCI> info mgr

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 6

Practice 10-3: Modifying the Extract Parameters on the Source


Database
Tasks
1.

Modify the Extract parameter file on the source database (GG_AMER_HOME terminal
window) for the following:

GGSCI> EDIT PARAM extwest


Write a message to the report file after processing every 1000 records.
_______________________________________________________________

Only extract data from the ACCOUNT_TRANS table if the account_trans_type is equal
to CR.
_______________________________________________________________
Activate the changes by stopping and restarting the Extract to have the changes take effect.
Then verify that the Extract has started:

2.

GGSCI> stop extract extwest


GGSCI> start extract extwest
GGSCI> info er *

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 7

3.

Clean up the GoldenGate environment by executing the following GGSCI commands on


both the source and target servers:
GGSCI> STOP er *
GGSCI> DBLOGIN userid gguser, password oracle_4U
GGSCI> DELETE er * (confirm the deletion)
GGSCI> DELETE checkpointtable (only necessary on the EURO db,
confirm the deletion)
GGSCI> STOP mgr !
SHELL> rm ./dirdat/*
SHELL> rm ./dirrpt/*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Oracle GoldenGate Parameters


Chapter 10 - Page 8

Practices for Lesson 11: Data


Selection and Filtering
Chapter 11

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11: Data Selection and Filtering


Chapter 11 - Page 1

Practices for Lesson 11


Overview
There are no practices for this Lesson.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11: Data Selection and Filtering


Chapter 11 - Page 2

Practices for Lesson 12:


Additional Transformation
Topics
Chapter 12

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12: Additional Transformation Topics


Chapter 12 - Page 1

Practices for Lesson 12: Overview


Practices Overview
In this practice, you will learn more about the structure and parameters that make up
GoldenGate macros and user tokens. These will be used in subsequent labs.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12: Additional Transformation Topics


Chapter 12 - Page 2

Practice 12-1: Modifying an Existing Set of Macros and User Tokens


Overview
In this practice, you will finish creating three macros. GoldenGate Macros provide functionality
for sharing parameters or other run-time configuration settings across multiple components and
externalizing complex configuration settings in order to streamline parameter file contents.
Best practice is to create a file or series of files as a macro library and store them in a specific
folder (for example, dirmac).
1.
2.

In the GG_AMER_HOME terminal window, at the Linux shell navigate to the


/home/oracle/labs/Section12 directory.
Open the macrolib_shell.mac file in the vi editor. Referring to the GoldenGate
documentation (Oracle GoldenGate Windows and UNIX Reference Guide 11g Release 1
(11.1.1) (gg_wux_ref_11_1_1.pdf)), fill in the <blanks> with the appropriate values to
complete the three macros, #dbconnect, #bpsettings, and #funcsmap:
<a> The key word that a macro body begins with
<b> The key word that a macro ends with
<c> To reset the statistics when a new report is generated
<d> Generate a report every day at 1 minute after midnight.
<e> Close the current report file and create a new one daily at 1 minute after minute.
<f> The key word that maps records between different source and target columns
<g> The function that is used to return information about the Oracle GoldenGate
environment
<h> The function used to identify a user token
MACRO #dbconnect
<a>
userid gguser, password <encrypted password>, encryptkey DEFAULT
<b>;
MACRO #bpsettings
BEGIN
<c>
<d>
<e>
REPORTCOUNT EVERY 60 SECONDS, RATE
END;
MACRO #funcsmap
PARAMS (#src_table, #target_table)
BEGIN
MAP #src_table, TARGET #target_table,
<f> (usedefaults,
gg_commit_ts = <g> ("GGHEADER","COMMITTIMESTAMP"),
lag_extract_ms = <h> ("TKN-EXTLAG-MSEC"),
lag_replicat_ms = @GETENV ("LAG", "MSEC"),
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12: Additional Transformation Topics


Chapter 12 - Page 3

src_db_name = @TOKEN ("TKN-SRC-DBNAME"),


src_db_version = @TOKEN ("TKN-SRC-DBVERSION"),
src_txn_csn = @TOKEN ("TKN-TXN-CSN")
);
END;

After all of the parameters have been set correctly, save and close the file. Verify that it
has the correct parameters by comparing it to the macrolib.mac file, also located in
/home/oracle/labs/Section12 directory.
3.

Navigate to the $GG_AMER_HOME directory. Create a directory name dirmac. Copy the
macrolib.mac file to this directory:

4.

Navigate to the $GG_EURO_HOME directory. Create a directory name dirmac. Copy the
macrolib.mac file to this directory.

Note: Both the macros and user tokens will be used in subsequent labs.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 12: Additional Transformation Topics


Chapter 12 - Page 4

Practices for Lesson 13:


Configuration Options
Chapter 13

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 1

Practices for Lesson 13: Overview


Practices Overview
In this practice, you will set up a configuration as depicted in the following graphic. You will also
use the macros and tokens created in the previous practice, including password encryption, trail
encryption, and SQLEXEC.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 2

Practice 13-1: Setting Up the Database and Source Definitions File


Overview
In this practice, you set up the new databases and create a DEFGEN file.

Tasks
1.

Open your two terminal windows (GG_AMER_HOME and GG_EURO_HOME) and navigate to
the home directories. Confirm that you are using the correct Oracle SID:
Shell> cd $GG_AMER_HOME
Shell> . oraenv
Shell> cd $GG_EURO_HOME
Shell> . oraenv

2.

On the source (GG_AMER_HOME terminal window), navigate to the


/home/oracle/labs/Section13/sqlscripts directory. Execute the following
command:
Shell> sqlplus west/oracle_4U @source_database.sql

3.

On the target (GG_EURO_HOME terminal window), navigate to the


/home/oracle/labs/Section13/sqlscripts directory. Execute the following
command
Shell>

4.

sqlplus east/oracle_4U @target_database.sql

On the source database (GG_AMER_HOME terminal window) configure the database to log
table key values by issuing the following commands:
Shell>
Shell>
GGSCI>
GGSCI>

cd $GG_AMER_HOME
ggsci
dblogin userid gguser, password oracle_4U
add trandata west.*

Note: Supplemental logging has already been enabled for the existing tables in the
database. Verify that supplemental logging has been enabled for the new ones:
WEST.CUST_ZIP, WEST.WSHOP_ENCRYPT, and WEST.WSHOP_FUNCS.
Generating Source Table Definitions
5. Because the target tables differ from the source, a source definitions file must be generated
for use in Replicat to perform the table name, column name, and data type conversions.
DEFGEN is the utility used to create this file. To create the DEFGEN file, on the source
database (GG_AMER_HOME), execute the following command at the GGSCI prompt:
GGSCI> edit params defgen

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 3

vi starts and opens the defgen.prm file. Add the following run-time parameters to the
text file:
DEFSFILE ./dirdef/section13.defs, purge
USERID gguser, PASSWORD oracle_4U
TABLE west.wshop_encrypt;
TABLE west.wshop_funcs;
TABLE west.cust_zip;

6.

Save and close the file.


In the GG_AMER_HOME terminal window, execute the command from the GGSCI prompt:
GGSCI> shell ./defgen paramfile ./dirprm/defgen.prm
DEFGEN will report run-time data to the screen. If any errors are reported, fix and rerun.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 4

7.

Exit the shell-out, and then exit GGSCI.


Copy the./dirdef/section13.defs file to the same location on the target server:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 5

In the GG_EURO_HOME terminal window, verify that the file is there:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 6

Practice 13-2: GoldenGate Encryption


Overview
GoldenGate offers three types of encryption: GoldenGate Trail, Data Transmission, and
password. In this practice, you will use the default GoldenGate encryption to encrypt the
password for the database login.

Tasks
1.

Before data encryption can occur, encryption keys must be generated using the keygen
utility.
To run KEYGEN and create keys that will be used for password and data transmission
encryption, start a Linux shell session in the GG_AMER_HOME terminal window and
navigate to the installation directory. Using the KEYGEN utility, create five keys, with two
having 64 bits and three having 128 bits. Then open the file with vi:
Shell>
Shell>
Shell>
Shell>

cd $GG_AMER_HOME
keygen 64 2 > ENKEYS
keygen 128 3 >> ENKEYS
vi ENKEYS

2.

Now you will need to name the keys MyKey1 through MyKey5. For this practice, we will
only be using one of the 64 bit encryption keys. However, if you decided to use Blowfish,
one of the 128 bit keys must be used. Save and close the file:

3.

Copy this file to the same location on the target (GG_EURO_HOME) system:
Shell> cp ENKEYS /u01/app/oracle/gg_euro
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 7

In the GG_EURO_HOME terminal window, verify that the file is there:

Password Encryption Using GoldenGate Default Encryption


4. Having clear text database login credentials stored in edit files may be deemed a security
violation. To solve this issue, GoldenGate provides a mechanism for encrypting the
database access password stored in its configuration files.
The encrypt password GGSCI command is used to accomplish this task. However,
two different levels of encryption are offered, GoldenGate Default, and Blowfish.
The encrypt password <password> GGSCI command uses the default
GoldenGate encryption key to encrypt the provided text. The returned encrypted text is
then copied into the parameter file in place of the clear text password. For correct
decryption, the default key must be specified in the parameter file as well.
Navigate to the /home/oracle/labs/Section12 directory to retrieve the file that was
completed in Practice 12 (macrolib.mac).
To encrypt the password used by the GoldenGate macro #dbconnect do the following:
a.

On the source database (GG_AMER_HOME), at the GGSCI prompt, execute the


following command:
GGSCI> encrypt password oracle_4U

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 8

b.
c.

Copy the encrypted password output.


Use vi to edit the./dirmac/macrolib.mac file.

d.

In the #dbconnect macro, replace <encrypted password> with the copied value.

e.
f.
g.

Be sure to specify the encryptkey as DEFAULT.


Save the file and exit.
Replace the same value in the macrolib.mac file on the EURO database
(/u01/app/oracle/gg_euro/dirmac).

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 9

Setting GoldenGate Change Data Capture (EFUNCS)


5. On the source server (GG_AMER_HOME terminal window), configure the change data
capture extract from a GGSCI prompt:
GGSCI> edit param efuncs

vi starts and opens the efuncs.prm file. Add the following run-time parameters to the
text file:
NOLIST
INCLUDE ./dirmac/macrolib.mac
LIST
EXTRACT EFUNCS
ENCRYPTTRAIL
EXTTRAIL ./dirdat/ex
#dbconnect ()
#bpsettings ()
TABLE west.wshop_encrypt;
NOENCRYPTTRAIL
EXTTRAIL ./dirdat/ec
TABLE west.wshop_encrypt;
TABLE west.cust_zip;
TABLE west.wshop_funcs, TOKENS (
TKN-EXTLAG-MSEC = @GETENV ("LAG", "MSEC"),
TKN-SRC-DBNAME = @GETENV ("DBENVIRONMENT", "DBNAME"),
TKN-SRC-DBVERSION = @GETENV ("DBENVIRONMENT", "DBVERSION"),
TKN-TXN-CSN = @GETENV ("TRANSACTION", "CSN")
);
Save and close the file.
6.

Add the Extract Group and two Local Extract Trails by executing the following GGSCI
commands:
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 10

GGSCI> add extract efuncs, tranlog, begin now


GGSCI> add exttrail ./dirdat/ex, extract efuncs, megabytes 1
GGSCI> add exttrail ./dirdat/ec, extract efuncs, megabytes 1

Setting Up the First GoldenGate Extract Data Pump (PFUNCS)


7. On the source server (GG_AMER_HOME terminal window), configure the first Extract Data
Pump to read from the Local Extract Trail ./dirdat/ex, transmit the data to the target
server, and write it to the Remote Trail ./dirdat/px:
GGSCI>

edit param pfuncs

vi starts and opens the pfuncs.prm file. Add the following run-time parameters to the
text file:
EXTRACT PFUNCS
RMTHOST <hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/px
PASSTHRU
TABLE west.*;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 11

8.

Save and close the file.


Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract pfuncs, exttrailsource ./dirdat/ex
GGSCI> add rmttrail ./dirdat/px, extract pfuncs, megabytes 1

Setting Up the Second GoldenGate Extract Data Pump (PFUNCA)


9. On the source server (GG_AMER_HOME terminal window), configure the second Extract Data
Pump to read from the Local Extract Trail ./dirdat/ec, transmit the data to the target
server, and write it to the Remote Trail ./dirdat/pc:
GGSCI>

edit param pfunca

vi starts and opens the pfunca.prm file. Add the following run-time parameters to the
text file:
EXTRACT PFUNCA
RMTHOST <hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/pc
PASSTHRU
TABLE west.*;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 12

10. Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract pfunca, exttrailsource ./dirdat/ec
GGSCI> add rmttrail ./dirdat/pc, extract pfunca, megabytes 1
Creating the GoldenGate Checkpoint Table
On the target server, Replicat checkpoints to a special table created in the database. This
Checkpoint Table ensures that the Replicat checkpoint is part of the transaction and is used to
ensure data integrity. If it does not already exist, create the Checkpoint Table:
11. On the target server (GG_EURO_HOME terminal window), start GGSCI and execute the
following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> info checkpointtable
GGSCI> add checkpointtable

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 13

Setting Up GoldenGate Delivery (Two Replicats: RFUNCA and RFUNC)


12. On the target server (GG_EURO_HOME terminal window), configure the Replicat Delivery
components:
GGSCI> edit param rfunca
vi starts and opens the rfunca.prm file. Add the following run-time parameters to the
text file:
NOLIST
INCLUDE ./dirmac/macrolib.mac
LIST
REPLICAT RFUNCA
#dbconnect ()
SOURCEDEFS ./dirdef/section13.defs
DISCARDFILE ./dirrpt/rfunca.dsc, purge
#bpsettings ()
#funcsmap (west.wshop_funcs, east.wshop_funcs)
MAP west.cust_zip, TARGET east.cust_city_state,
SQLEXEC (ID ZIPLKUP,
QUERY " select zip_city, zip_state from east.zip_lookup
where zip = :vzip ",
PARAMS (vzip = cust_zip)),
COLMAP (usedefaults,
cust_city = @GETVAL (ZIPLKUP.zip_city),
cust_state = @GETVAL (ZIPLKUP.zip_state)
);

Save and close the file.


13. In the GG_EURO_HOME terminal window, at the GGSCI prompt execute the command:
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 14

GGSCI>

edit param rfunc

vi starts and opens the rfunc.prm file. Add the following run-time parameters to the
text file:
REPLICAT RFUNC
USERID gguser, PASSWORD oracle_4U
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/rfunc.dsc, PURGE
DECRYPTTRAIL
MAP west.*, TARGET east.*;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 15

Save and close the file.


14. Add the Replicats by executing the following GGSCI command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add replicat rfunc, exttrail ./dirdat/px
GGSCI> add replicat rfunca, exttrail ./dirdat/pc
Generating Transactions
15. Ensure on both systems that the manager is up and running (if not, start the Manager):
GGSCI> info mgr
GGSCI> start mgr
16. In the GG_AMER_HOME window, start all of the extracts:
GGSCI> start er *

Verify that all process are running by executing the info er * command.

17. In the GG_EURO_HOME window, start all of the Replicats:


Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 16

GGSCI> start er *

Verify that all process are running by executing the info er * command. Exit GGSCI.
Note: The Replicats may already be running if the mgr.prm was not deleted in an earlier
lab.
18. In the GG_AMER_HOME terminal window, navigate to the
/home/oracle/labs/Section13/sqlscripts directory. At the Linux shelI prompt,
generate source database transactions by executing the following command:
Shell>

sqlplus west/oracle_4U @trans_generator.sql

Validating the Results


Verify that the data applied to the target wshop_encrypt table from the encrypted GoldenGate
Trails is the same as the source data.
19. In the GG_AMER_HOME terminal window, at the shell prompt start sqlplus and query the
wshop_encrypt table:
Shell> sqlplus west/oracle_4U
SQL> select * from wshop_encrypt;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 17

20. In the GG_EURO_HOME terminal window, at the shell prompt start sqlplus and query the
wshop_encrypt table:
Shell> sqlplus east/oracle_4U
SQL> select * from wshop_encrypt;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 18

Each table should contain 10 rows of encrypted equivalent data.


Validating the Token, Macro and SQLEXEC Information
21. In the GG_AMER_HOME terminal window, view the efuncs.prm parameter file. Four user
defined tokens will be added to each record captured for this table.

TKN-EXTLAG-MSEC uses the function @GETENV (all GoldenGate function names begin
with the @ character) to get the Extract database lag from the GoldenGate
environment.

TKN-SRC-DBNAME gets the source database name from the database environment.

TKN-SRC-DBVERSION gets the source database version from the database


environment.

TKN-TXN-CSN gets the commit sequence number for the transaction from the
database.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 19

22. In the GG_EURO_HOME terminal window, view the rfunca.prm parameter file:

The MAP statement for the wshop_funcs table utilizes the #funcsmap macro:

This macro uses two column conversion functions: @GETENV to get the commit
timestamp from the GoldenGate header record and Replicat lag from the GoldenGate
environment, and @TOKEN to get the tokens set by the source Extract.
Also notice that for the rfunca parameters, the map statement for east.cust_zip
uses the SQLEXEC option to query a lookup table.
For every west.cust_zip record, the query will be executed using the incoming data
for the cust_zip column in the where clause. The returned data is mapped into the
target zip_city and zip_state columns.
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 20

23. On the target database (GG_EURO_HOME terminal window), execute the command from a
shell prompt:
Shell>

sqlplus east/oracle_4U

Verify that the token data was applied to the target by executing the following command:
SQL> select src_db_name, src_db_version, src_txn_csn from
wshop_funcs;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 21

Now execute the command:


SQL>

select lag_extract_ms, lag_replicat_ms from wshop_funcs;

In the above example, Extract took 2642 milliseconds to capture each record from
Oracle redo, while Replicat lag time (Replicat current time transaction commit
timestamp) was around 6615 milliseconds. (Your values may vary.)
To return the data that was recorded as the source record commit timestamp, execute
the following command:
SQL> select gg_commit_ts from wshop_funcs;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 22

Back in the GG_AMER_HOME terminal window, execute the following command:


Shell> sqlplus west/oracle_4U
SQL> select * from cust_zip;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 23

Verify the SQLEXEC functionality by executing the following command in the


GG_EURO_HOME terminal window:
SQL> select * from cust_city_state;

24. Clean up the GoldenGate environment by executing the following GGSCI commands on
both the source and target servers:
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>
SHELL>
SHELL>

STOP er *
DBLOGIN userid gguser, password oracle_4U
DELETE er *
DELETE checkpointtable (only for the EURO db)
STOP mgr !
rm ./dirdat/*
rm ./dirrpt/*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 13: Configuration Options


Chapter 13 - Page 24

Practices for Lesson 14:


Bidirectional Replication
Chapter 14

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 1

Practices for Lesson 14: Overview


Practices Overview
In this practice, we shall configure GoldenGate to perform real-time data capture and apply to
two active databases with data segregated by location.

In the preceding diagram, the AMER and EURO databases are exact copies of one another.
Our application is load-balanced across the two data centers so that each data center services
50% of all active accounts. Each data center is also the backup to the other, so the two
databases must always be in sync. This is accomplished by configuring GoldenGate in ActiveActive mode, with Change Data Capture Extracts reading from each databases Redo and
Archive logs, pumping the captured data over TCP/IP to a staging queue (GoldenGate Remote
Trail), and applied via Replicat.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 2

Practice 14-1: Two-Way Active-Active Data Replication


Overview
In this practice, you will create the two databases (AMER and EURO) and seed them both with
identical data, and then you will ensure that database logging is enabled.
In a two-way active-active (bidirectional) replication environment, we must avoid data looping,
where data changes replicated from system A to system B are replicated back to system A.
There are several loop detection and avoidance methods. We will configure each Extract
process to ignore transactions originated by its local Replicat user. This is done by setting the
TRANLOGOPTIONS EXCLUDEUSER parameter in the Extract parameter file.

Tasks
1.

Open a terminal window and navigate to the $GG_AMER_HOME directory. Verify that you are
in the correct database by issuing the . oraenv command. Navigate to the
/home/oracle/labs/Section14/Practice14-1/sqlscripts directory. To create
the AMER database, execute the following command:
Shell> sqlplus west/oracle_4U
SQL> set echo on
SQL> @database.sql

2.

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.
To seed the source database, execute the following command:
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 3

Shell> sqlplus west/oracle_4U


SQL> set echo on
SQL> @seed_database.sql

3.

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.
Open another terminal window and navigate to the $GG_EURO_HOME directory. Verify that
you are in the correct database by issuing the . oraenv command. Navigate to the
/home/oracle/labs/Section14/Practice14-1/sqlscripts directory. To create
the EURO database, execute the following command:
Shell> sqlplus east/oracle_4U
SQL> set echo on
SQL> @database.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 4

4.

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.
To seed the source database, execute the following command:
Shell> sqlplus east/oracle_4U
SQL> set echo on
SQL> @seed_database.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 5

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.

Creating the Replicat Checkpoint Table on AMER


Replicat checkpoints to a special table created in the database. This checkpoint table ensures
that the Replicat checkpoint is part of the transaction and is used to ensure data integrity.
5. To create the GLOBALS parameter file, navigate to the directory where GoldenGate is
installed, and execute the following commands:
Shell> cd $GG_AMER_HOME
Shell> vi GLOBALS
Input the following parameter.
checkpointtable GGS_CHECKPOINT

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 6

6.

Save and close the file.


To create the checkpoint table on the AMER database server, start GGSCI and execute the
following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add checkpointtable
Note: If the checkpoint table already exists, you will receive an error message. If so,
issue the delete checkpointtable command, confirm the deletion, and then try
adding the checkpoint table again.

Creating the Replicat Checkpoint Table on EURO


7.

To create the checkpoint table on the EURO database server, start GGSCI and execute the
following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add checkpointtable
Note: If the checkpoint table already exists, you will receive an error message. If so,
issue the delete checkpointtable command, confirm the deletion, and then try
adding the checkpoint table again.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 7

Getting the Database to Log Keys


As we have seen in previous practices, the Oracle database must be set to log the table key
values whenever it logs a row change, so that they are available to GoldenGate in Redo.
8. At a GGSCI prompt on the AMER database server (GG_AMER_HOME terminal window),
execute the following commands:
GGSCI>
GGSCI>

dblogin userid gguser, password oracle_4U


add trandata west.*

Validate table-level supplemental logging is on by executing the following command:


In the GG_AMER_HOME terminal window:
GGSCI> info trandata west.*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 8

9.

At a GGSCI prompt on the EURO database server (GG_EURO_HOME terminal window),


execute the following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add trandata east.*
Validate table-level supplemental logging is on by executing the following command:
In the GG_EURO_HOME terminal window:
GGSCI> info trandata east.*

Creating the GoldenGate Components on AMER


In this practice, you will configure the Manager, Extract, Data Pump Extract, and Replicat on the
AMER instance.
From the previous practices, you should still have a number of parameters files already created
for the AMER database. For this practice, you will be using:

mgr.prm

extwest.prm

pwest.prm
You will modify those three parameter files for this practice and create a number of new entries
for both the AMER and EURO databases.

Configuring Change Data Capture, AMER to EURO


10. In your GG_AMER_HOME terminal window at a GGSCI prompt, execute the following
command:
GGSCI> edit params mgr
Verify that it includes the following:
PORT 15000
DYNAMICPORTLIST 15010-15020
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 9

11. Start the Manager and verify that it is running:


GGSCI> start mgr
GGSCI> info manager

12. In the GG_AMER_HOME terminal window at the GGSCI prompt, modify the extract file by
executing the following command:
GGSCI>

edit params extwest

Add the following parameter on an empty line before the first TABLE statement:
tranlogoptions excludeuser gguser
Edit and verify that the exwest.prm file looks like the following:
EXTRACT extwest
EXTTRAIL ./dirdat/ew
USERID gguser, PASSWORD oracle_4U
STATOPTIONS RESETREPORTSTATS
REPORT AT 00:01
REPORTROLLOVER AT 00:01
REPORTCOUNT EVERY 60 SECONDS, RATE
tranlogoptions excludeuser gguser
TABLE west.*;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 10

Save and close the file.


13. Add the Extract group by executing the following GGSCI commands:

add extract extwest, tranlog, begin now


This adds the extwest Extract to GoldenGate specifying that it will read from Oracle
Redo/Archive, with an initial Redo checkpoint of the current timestamp.

add extrtrail ./dirdat/ew, extract extwest, megabytes 50


This adds the./dirdat/ew Local Extract Trail, with a maximum file size of 50
megabytes per trail, and links the trail to the extwest Extract.

14. On the AMER database server, configure the Extract Data Pump to read from
the./dirdat/ew Local Extract Trail, transmit the data to the EURO server, and write it to
the./dirdat/pe Remote Trail:
From a GGSCI prompt, execute the following command:
GGSCI> edit params pwest
Verify that it includes the following:
EXTRACT pwest
RMTHOST <replace with your hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/pe
PASSTHRU
TABLE west.*;
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 11

Save and close the file.


15. Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract pwest, exttrailsource ./dirdat/ew
GGSCI> add rmttrail ./dirdat/pe, extract pwest, megabytes 50

16. To set up GoldenGate Delivery on the AMER database, you must configure the Replicat
component. From a GGSCI prompt, execute the following command:
GGSCI> edit param rwest
vi starts and opens the rwest.prm file. Add the following run-time parameters to the
text file:
REPLICAT RWEST
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/rwest.dsc, PURGE
USERID gguser, PASSWORD oracle_4U
MAP east.*, TARGET west.*;
Save and close the file.
17. Add the Replicat by executing the following GGSCI command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add replicat rwest, exttrail ./dirdat/pw

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 12

Creating the GoldenGate Components on EURO


Now you will configure the Manager, Extract, Data Pump Extract, and Replicat on the EURO
instance.
From the previous practices, you should still have a number of parameters files already created
for the EURO database. For this practice, you will be using:

mgr.prm

reast.prm
You will modify these parameter files in this practice and create a number of new entries and a
new parameter file for both the AMER and EURO databases.

Configuring the Change Data Capture, EURO to AMER


18. In your GG_EURO_HOME terminal window at a GGSCI prompt, execute the following
command:
GGSCI> edit params mgr
Verify that it includes the following:

19. Start the Manager and verify that it is running:


GGSCI> start mgr
GGSCI> info manager

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 13

20. In the GG_EURO_HOME terminal window, create the extract file by executing the following
command:
GGSCI> edit params eeast
vi starts and opens the eeast.prm file. Add the following run-time parameters to the
text file:
EXTRACT EEAST
EXTTRAIL ./dirdat/ee
USERID gguser, PASSWORD oracle_4U
TRANLOGOPTIONS EXCLUDEUSER GGUSER
TABLE east.*;

Save and close the file.


21. Add the Extract group by executing the following GGSCI commands:

add extract eeast, tranlog, begin now


This adds the eeast Extract to GoldenGate, specifying that it will read from Oracle
Redo/Archive with an initial Redo checkpoint of the current timestamp.

add exttrail ./dirdat/ee, extract eeast, megabytes 50


This adds the./dirdat/ee Local Extract Trail, with a maximum file size of 50
megabytes per trail, and links the trail to the Extract eeast.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 14

22. On the EURO database server, configure the Extract Data Pump to read from
the./dirdat/ee Local Extract Trail, transmit the data to the AMER server, and write it to
the ./dirdat/pw Remote Trail:
From a GGSCI prompt, execute the following command:
GGSCI> edit params peast
vi starts and opens the peast.prm file. Add the following run-time parameters to the
text file:
EXTRACT PEAST
RMTHOST <replace with your hostname>, MGRPORT 15000, COMPRESS
RMTTRAIL ./dirdat/pw
PASSTHRU
TABLE east.*;

Save and close the file.


23. Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract peast, exttrailsource ./dirdat/ee
GGSCI> add rmttrail ./dirdat/pw, extract peast, megabytes 50

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 15

24. To set up GoldenGate Delivery on the EURO database, you must modify the Replicat
parameter file. From a GGSCI prompt, execute the following command:
GGSCI> edit param reast
Verify that it includes the following:
REPLICAT REAST
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/reast.dsc, PURGE
USERID gguser, PASSWORD oracle_4U
MAP west.*, TARGET east.*;

Save and close the file.


25. Add the Replicat by executing the following GGSCI command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add replicat reast, exttrail ./dirdat/pe

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 16

Validating the Results


26. In both the GG_AMER_HOME terminal window and the GG_EURO_HOME terminal window,
execute the following command at the GGSCI prompt to start all of the configured Extracts
and Replicats:
GGSCI> start er *
For GG_AMER_HOME:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 17

For GG_EURO_HOME:

27. Execute the following GGSCI command to make sure that all of the components are in the
RUNNING state:
GGSCI> info er *
For GG_AMER_HOME:

Write down the Log Read Checkpoint RBA numbers you see on your screen:
______________________________________________________________________
__

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 18

For GG_EURO_HOME:

Write down the Log Read Checkpoint RBA numbers you see on your screen:
______________________________________________________________________
__
If any GoldenGate groups show a state of STOPPED or ABEND, view the groups report
file, fix the error condition, and restart the group.
Exit GGSCI in both terminal windows.
28. Start database activity by running the transaction generators simultaneously in the Linux
shells.
In the GG_AMER_HOME terminal window, navigate to the
./home/oracle/labs/Section14/Practice14-1/sqlscripts directory. To
generate transactions for the AMER database, execute the following command:
Shell> sqlplus west/oracle_4U
SQL> set echo on
SQL> @trans_generator_west.sql
In the GG_EURO_HOME terminal window, navigate to the
./home/oracle/labs/Section14/Practice14-1/sqlscripts directory. To
generate transactions for the EURO database, execute the following command:
Shell> sqlplus east/oracle_4U
SQL> set echo on
SQL> @trans_generator_east.sql
30. After the transaction generator scripts complete, execute the GGSCI command on each
database:
GGSCI> info er *
This will display information for the two Replicats. When the Log Read Checkpoint RBA
value returned stops incrementing for the Replicats all captured data has been applied.
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 19

Compare the RBA values with those you wrote down earlier, after you started the
Replicats and Extracts. The RBA values should now be much higher.
31. Execute the GGSCI command in the GG_AMER_HOME terminal window to get operation
counts per table for the change data capture Extract:
GGSCI> stats extwest, total
In the GG_EURO_HOME terminal window, execute the same command for the Replicat.
GGSCI> stats reast, total
The counts for the Extract (on AMER) and Replicat (on EURO) numbers should match.
32. Do the same for the EEAST Extract and the RWEST Replicat. The transaction counts for
these components should match as well.
Execute the GGSCI command in the GG_EURO_HOME terminal window to get operation
counts per table for the change data capture Extract:
GGSCI> stats eeast, total
In the GG_AMER_HOME terminal window, execute the same command for the Replicat.
GGSCI> stats rwest, total
The counts for the Extract (on EURO) and Replicat (on AMER) numbers should match.
Because TRANLOGOPTIONS EXCLUDEUSER GGUSER was specified in the Extract
parameter files on both AMER and EURO, it ensured changes made by the local Replicat
user will not be extracted along with changes made by other users on that site.
33. Clean up the GoldenGate environment by executing the following GGSCI commands on
both the source and target servers:
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>
SHELL>
SHELL>

STOP er *
DBLOGIN userid gguser, password oracle_4U
DELETE er *
DELETE checkpointtable
STOP mgr
rm ./dirdat/*
rm ./dirrpt/*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 20

Practice 14-2: Conflict Detection and Resolution


Overview
Because GoldenGate is an asynchronous solution, in a dual active environment, conflicts can
occur when modifications are made to identical sets of data on separate systems at the same
time.
Conflicts occur when the timing of simultaneous changes results in one of the following out-ofsync conditions:

A replicated insert attempts to add a row that already exists in the target.
The before image of a replicated update does not match the current row in the target.

A replicated delete attempts to remove a row that does not exist in the target.
For example, UserA on DatabaseA updates a row, and UserB on DatabaseB updates the same
row. If UserBs transaction occurs before UserAs transaction is synchronized to DatabaseB,
there will be a conflict on the replicated transaction.
In this practice, you will set up a very simple GoldenGate configuration to demonstrate net
change value. Conflict detection and conflict resolution will be implemented to maintain accurate
inventory counts when the application uses update statements to decrement inventory. The
premise for this demonstration is an online retail environment where:
1. The warehouse is stocked with 20 widgets. If the quantity on hand goes to 0, the item
is tagged as out of stock in our online ordering system.
2. Customer A places an order for 15 widgets that is routed through the AMER (aka
West) database.
The SQL statement executed is update products set qty_in_stock =
qty_in_stock 15 where products_name = widget and
qty_in_stock = 20;
Customer B simultaneously places an order for 4 widgets that is routed through the
EURO (aka East) database.

3.

The SQL statement executed is update products set qty_in_stock =


qty_in_stock 4 where products_name = widget and
qty_in_stock = 20;

In this example, the number of widgets in stock according to the AMER database is 5,
and the number in stock according to the EURO database is 16.
With conflict detection enabled, when GoldenGate attempts to update the EURO (East)
database with the transaction from customer A, routed through AMER (West), the
transaction will fail because the before image (from AMER) of qty_in_stock is 20,
which does not match the current column value of 16 in EURO. Conversely, the
transaction replicated to the AMER (West) database will also fail because the before
image (from EURO) of qty_in_stock, 20, does not match the current column value of 5
in AMER.
To resolve the conflict, you will add code in the Replicat Delivery configuration to
subtract the sum total of the orders from both sites, so that the resulting qty_in_stock
values after the replicated transactions are applied will be the same on both sites.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 21

The following flowchart shows the components and relationships that you will create:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 22

Tasks
Creating the tables and data in the Database
1.

In the GG_AMER_HOME terminal window, navigate to the


/home/oracle/labs/Section14/Practice14-2/sqlscripts directory. To create
the tables in the AMER database, execute the following command:
Shell> sqlplus west/oracle_4U
SQL> set echo on
SQL> @database_west.sql

2.

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.
In the GG_EURO_HOME terminal window, navigate to the
/home/oracle/labs/Section14/Practice14-2/sqlscripts directory. First, you
must create a user, west, on the EURO machine to be able to access the tables.
To create the west user, execute the following command:
Shell> sqlplus east/oracle_4U
SQL> set echo on
SQL> @create_west_user.sql

3.

Scroll down the terminal window to see what objects were created, and what SQL
statements were executed.
Exit SQL and log back in as the west user. Then, to create the tables in the EURO
database, execute the following command:
Shell> sqlplus west/oracle_4U
SQL> set echo on
SQL> @database_east.sql

Getting the Database to Log Keys


4.

At a GGSCI prompt on the AMER database server (GG_AMER_HOME terminal window),


execute the following commands to turn on supplemental logging:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add trandata west.products, COLS (products_name,
qty_in_stock)

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 23

5.

At a GGSCI prompt on the EURO database server (GG_EURO_HOME terminal window),


execute the following commands to enable supplemental logging:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add trandata west.products, COLS (products_name,
qty_in_stock)

Configuring and Starting the GoldenGate Manager on AMER and EURO


6.

In the GG_AMER_HOME terminal window, create the Manager parameter file:


GGSCI> edit params mgr
Verify the following parameters are present:
PORT 15000
DYNAMICPORTLIST 15010-15020
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS

7.

Save and close this file.


Start the Manager process:
GGSCI> start mgr
GGSCI> info manager

8.

In the GG_EURO_HOME terminal window, create the Manager parameter file:


GGSCI> edit params mgr
Verify the following parameters are present:
PORT 15001
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 24

PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS


9.

Save and close this file.


Start the Manager process:
GGSCI> start mgr
GGSCI> info manager

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 25

Setting Up Change Data Capture on AMER


10. From a GGSCI prompt in the GG_AMER_HOME terminal window, execute the following
command to edit the parameter file for the extract group, weconf:
GGSCI> edit param weconf
vi starts and opens the weconf.prm file. Add the following run-time parameters to the
text file:
EXTRACT WECONF
EXTTRAIL ./dirdat/wf
USERID gguser, PASSWORD oracle_4U
GETUPDATEBEFORES
TRANLOGOPTIONS EXCLUDEUSER GGUSER
TABLE west.products;
Check the reference document. Write down the purpose of the GETUPDATEBEFORES
parameter:
______________________________________________________________________
_
Save and close the file.
11. Add the Extract Group, weconf to start extracting now and to write to a trail file in the dirdat
directory with a trail file size of 5 MB and a name of wf by executing the following GGSCI
commands :
GGSCI> add extract weconf, tranlog, begin now
GGSCI> add exttrail ./dirdat/wf, extract weconf, megabytes 5

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 26

12. To set up the Extract Data Pump on the AMER database, execute the following command at
the GGSCI prompt:
GGSCI> edit param pwconf
vi starts and opens the pwconf.prm file. Add the following run-time parameters to the
text file:
EXTRACT PWCONF
RMTHOST <replace with your hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/pf
PASSTHRU
TABLE west.*;

13. Add the Data Pump Extract Group by executing the following GGSCI commands. You will
configure the Extract Data Pump to read from the./dirdat/wf Local Extract Trail,
transmit the data to the AMER server, and write it to the ./dirdat/pf Remote Trail:
GGSCI> add extract pwconf, exttrailsource ./dirdat/wf
GGSCI> add rmttrail ./dirdat/pf, extract pwconf, megabytes 50

Setting Up the EURO Database for Delivery


14. To create the Checkpoint Table on the EURO database server (GG_EURO_HOME terminal
window), at the GGSCI prompt, execute the following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add checkpointtable
15. To set up the Replicat Delivery component, execute the following command at the GGSCI
prompt:
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 27

GGSCI> edit param reconf


vi starts and opens the reconf.prm file. Add the following run-time parameters to the
text file:
REPLICAT RECONF
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/reconf.dsc, PURGE
USERID gguser, PASSWORD oracle_4U
Add the following additional parameters to the file (these can be found in the
GoldenGate Reference Guide):

Find the parameter that allows Replicat to process duplicate MAP statements.

Find the parameter that sets Replicate to ignore update operations performed on the
source database.

Map all EUROs tables owned by the west user to tables with the same name in
AMERs tables.

Set Replicat to process update operations performed on the source database.

Set Replicat to ignore insert operations performed on the source database.

Set Replicat to ignore delete operations performed on the source database.


Add the following to the parameter file:
map west.products, target west.products,
SQLEXEC (id conflict,
query "select qty_in_stock from west.products where
products_number = :vpnum",
params (vpnum = products_number)),
colmap (products_number = products_number,
products_name = products_name,
qty_in_stock = @if(conflict.qty_in_stock <>
BEFORE.qty_in_stock,
@compute(conflict.qty_in_stock - (BEFORE.qty_in_stock qty_in_stock)),
qty_in_stock)
);
This MAP statement performs the conflict detection and resolution on the
west.products table for transactions performed on the west.products table. For all
update operations, a query is executed against the target table and the data from the
qty_in_stock column is returned.
The GoldenGate Column Mapping function, @IF, is used to compare the returned value
(current qty_in_stock value of the target west.products table) with the before
column image read (original qty_in_stock value of the source west.products
table) from the GoldenGate Trail.
If the values are not equal (in other words conflict is detected), the source table value for
qty_in_stock is subtracted from the source before image qty_in_stock value. The
result is then subtracted from the current target qty_in_stock value (returned from
the query), and the result is applied to the target table.
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 28

If the values are equal, the second statement is executed where the source data value is
applied to the target table.
Save and close the file. The final contents of your file should look like the following:
REPLICAT RECONF
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/reconf.dsc, PURGE
USERID gguser, PASSWORD oracle_4U
allowduptargetmap
ignoreupdates
map west.*, target west.*;
getupdates
ignoreinserts
ignoredeletes
map west.products, target west.products,
SQLEXEC (id conflict,
query "select qty_in_stock from west.products where
products_number = :vpnum",
params (vpnum = products_number)),
colmap (products_number = products_number,
products_name = products_name,
qty_in_stock = @if(conflict.qty_in_stock <>
BEFORE.qty_in_stock,
@compute(conflict.qty_in_stock - (BEFORE.qty_in_stock qty_in_stock)),
qty_in_stock)
);
16. Add the Replicat by executing the following GGSCI command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add replicat reconf, exttrail ./dirdat/pf

Configuring Data Capture on EURO


17. In the GG_EURO_HOME terminal window, from a GGSCI prompt, execute the following
command to configure the primary Extract:
GGSCI> edit param eeconf
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 29

vi starts and opens the eeconf.prm file. Add the following run-time parameters to the
text file:
EXTRACT EECONF
EXTTRAIL ./dirdat/eg
USERID gguser, PASSWORD oracle_4U
TRANLOGOPTIONS EXCLUDEUSER GGUSER
GETUPDATEBEFORES
TABLE west.products;

18. Add the Extract Group by executing the following GGSCI commands. Add the Extract
Group, eeconf to start extracting now and to write to a trail file in the dirdat directory with a
trail file size of 5 MB and a name of eg.
GGSCI> add extract eeconf, tranlog, begin now
GGSCI> add exttrail ./dirdat/eg, extract eeconf, megabytes 5

19. In the GG_EURO_HOME terminal window, configure the Extract Data Pump to read from the
./dirdat/eg Local Extract Trail, transmit the data to the AMER server, and write it to the
./dirdat/pg Remote Trail:
GGSCI> edit param peconf
vi starts and opens the peconf.prm file. Add the following run-time parameters to the
text file:
EXTRACT PECONF
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 30

RMTHOST <replace with your hostname>, MGRPORT 15000, COMPRESS


RMTTRAIL ./dirdat/pg
PASSTHRU
TABLE west.*;

Save and close the file.


20. Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract peconf, exttrailsource ./dirdat/eg
GGSCI> add rmttrail ./dirdat/pg, extract peconf, megabytes 5

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 31

Creating the Delivery Components on the AMER Database


21. To create the checkpoint table on the AMER database server, start GGSCI in the
GG_AMER_HOME terminal window, and execute the following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add checkpointtable

22. In the GG_AMER_HOME terminal window, configure the Replicat Delivery component from a
GGSCI prompt:
GGSCI> edit param rwconf
vi starts and opens the rwconf.prm file. Add the following run-time parameters to the
text file:
REPLICAT RWCONF
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/rwconf.dsc, PURGE
USERID gguser, PASSWORD oracle_4U
ALLOWDUPTARGETMAP
IGNOREUPDATES
MAP west.*, TARGET west.*;
GETUPDATES
IGNOREINSERTS
IGNOREDELETES
map west.products, target west.products,
SQLEXEC (id conflict,
query "select qty_in_stock from west.products where
products_number = :vpnum",
params (vpnum = products_number)),
colmap ( products_number = products_number, products_name =
products_name, qty_in_stock = @if(conflict.qty_in_stock <>
BEFORE.qty_in_stock,
@compute(conflict.qty_in_stock - (BEFORE.qty_in_stock qty_in_stock)),
qty_in_stock)
);
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 32

This is essentially the same conflict detection and resolution code as defined on the
EURO delivery component.
Save and close the file.
23. Add the Replicat by executing the following GGSCI commands in the GG_AMER_HOME
terminal window:
GGSCI> dblogin userid gguser, password oracle_4U
GGSIC> add replicat rwconf, exttrail ./dirdat/pg

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 33

Starting the GoldenGate Processes and Generating Data


24. In both the GG_AMER_HOME and GG_EURO_HOME terminal windows, execute the following
command to start all of the configured Extracts and Replicats:
GGSCI> start er *
Make sure they are all in the RUNNING state:
GGSCI> info er *

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 34

If any GoldenGate group shows a status of STOPPED or ABEND, view the report file,
correct any errors, and then restart the group.
Exit GGSCI in both terminal windows.
25. Issue a SQL query against both the AMER and the EURO database servers, and check the
current value of the qty_in_stock column in the west.products . Verify that the
qty_in_stock equals 20 in both databases.
In the GG_AMER_HOME window:
Shell> sqlplus west/oracle_4U
SQL > select * from products;
SQL > exit
In the GG_EURO_HOME window:
Shell> sqlplus west/oracle_4U
SQL > select * from products;
SQL > exit

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 35

26. In the GG_AMER_HOME terminal window, navigate to the


/home/oracle/labs/Section14/Practice14-2/sqlscripts directory. View the
contents of the trans_generator_west.sql file. Notice that the update statement
decrements the qty_in_stock value by 15, so the new qty_in_stock value in AMERs
west.products table will be 5 after the update.
27. In the GG_EURO_HOME terminal window, navigate to the
/home/oracle/labs/Section14/Practice14-2/sqlscripts directory. View the
contents of the trans_generator_east.sql file. Notice that the update statement
decrements the qty_in_stock value by 4, so the new qty_in_stock value in EUROs
west.products table will be 16 after the update.
28. What is the combined number of widgets ordered from both sites? What should the
qty_in_stock value be after the transactions are completed in each of these databases,
and then replicated across to the other database?
29. In the GG_AMER_HOME terminal window, navigate to the
/home/oracle/labs/Section14/Practice14-2/sqlscripts directory and input
the following command. Note: Do not press the Return key.
Shell> sqlplus west/oracle_4U @trans_generator_west.sql
30. In the GG_EURO_HOME terminal window, navigate to the
/home/oracle/labs/Section14/Practice14-2/sqlscripts directory and input
the following command. Press the Return key and immediately return to the
GG_AMER_HOME window and press the Return key as well (you are trying to simulate a
situation where a row is being updated on two different databases simultaneously).
Shell> sqlplus west/oracle_4U @trans_generator_east.sql
Execute the GGSCI info er * command again, and check that the RBA value
reported under Log Read Checkpoint increments for all components.
Wait for the transaction generator script to complete before proceeding.
31. In the GG_AMER_HOME terminal window, at a Linux shell start sqlplus by executing the
following commands:
Shell> sqlplus west/oracle_4U
SQL> select * from products;
In the GG_EURO_HOME window, at a Linux shell start sqlplus by executing the following
commands:
Shell> sqlplus west/oracle_4U
SQL> select * from products;
If both tables show the same number of widgets in stock (the values should be 1), you
have successfully completed this practice.
32. Clean up the GoldenGate environment by executing the following GGSCI commands on
both the source and target servers:
GGSCI>
GGSCI>
GGSCI>
GGSCI>
GGSCI>
SHELL>

STOP er *
DBLOGIN userid gguser, password oracle_4U
DELETE er *
DELETE checkpointtable
STOP mgr
rm ./dirdat/*
Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 36

SHELL> rm ./dirrpt/*

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 37

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 14: Bidirectional Replication


Chapter 14 - Page 38

Practices for Lesson 15: DDL


Replication
Chapter 15

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 1

Practices for Lesson 15: Overview


Practices Overview
In this practice, you will support the synchronization of DDL operations in homogeneous,
unidirectional environments.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 2

Practice 15-1: DDL Replication


Assumptions
To enable DDL capture, several modifications must be made to the source database;
specifically, the creation of five tables in a tablespace with sufficient space to allow growth of the
marker and history tables, a database trigger and associated packages, and a user role.
Before attempting to set up DDL capture, all open sessions in the database must be closed
(which requires a database outage).

Tasks
To set up the database for DDL capture, execute the following on the source
(GG_AMER_HOME terminal window) database:
1. Choose which schema DDL objects will be created in (for this practice, the GGUSER
schema will be used). Navigate to the $GG_AMER_HOME directory and execute GGSCI:
Shell> cd $GG_AMER_HOME
2.

3.

Using vi, edit the file GLOBALS, located in the GoldenGate base directory, and add the
following parameter:
GGSCHEMA GGUSER

Save and close the file.


Start SQL*PLUS as sysdba:
Shell> sqlplus / as sysdba

4.

Execute the following commands:


SQLPLUS> GRANT EXECUTE ON UTL_FILE TO GGUSER;
SQLPLUS> ALTER SYSTEM SET recyclebin = OFF DEFERRED;

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 3

5.

Close all Oracle sessions by executing the shutdown immediate command. To find
open sessions, execute the query:
SQL> select sid, serial#, username from v$session where status =
'ACTIVE' or status = 'INACTIVE';
SQL> shutdown immediate;
SQL> exit

6.

Note: The number of sessions running may vary. Instead of 26, you may see a different
number of rows selected. This is fine, and will not affect the rest of the lab practice.
Log back in to SQL as sysdba and start up the database:
Shell> sqlplus / as sysdba
SQL> startup

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 4

7.

Run the marker_setup.sql script:


SQL>@marker_setup.sql
Script> GGUSER

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 5

8.

Run the ddl_setup.sql script:


SQL>@ddl_setup.sql
Script> GGUSER
Script> INITIALSETUP

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 6

9.

Run the role_setup.sql script:


SQL>@role_setup.sql
Script> GGUSER

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 7

10. As specified in the role_setup.sql output, grant the GGSUSER_ROLE to the


GoldenGate database user:
SQL> GRANT GGS_GGSUSER_ROLE TO GGUSER;

11. Make the ddl_pin script part of the database startup. It must be invoked with the
GoldenGate DDL username (this script improves the performance of the DDL trigger and
requires the Oracle dbms_shared_pool system package):
SQL>@ddl_pin GGUSER

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 8

Exit SQL. The database is now set up for DDL capture.

Housekeeping Considerations
For continuing operations, the DDL marker, history, and trace tables must be monitored and
routinely cleared of non-essential data.
12. In the GG_AMER_HOME terminal window at the GGSCI prompt, add the following
parameters to the mgr.prm file:
PURGEMARKERHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5
PURGEDDLHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5

Close and save the file.


13. Stop and restart the GoldenGate Manager
stop mgr !
start mgr
Note: To prevent the DDL trace file from consuming excessive disk space, run the
ddl_cleartrace script on a regular basis. This script deletes the file, but GoldenGate
will create it again. This script must be run manually or may be set up to run via cron.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 9

Setting Up the Workshop Database and Configuration


Before continuing further, we want to make sure that we start with a clean schema area for our
lab.
14. Navigate to the /home/oracle/labs/Section15/sqlscripts directory. In the
GG_AMER_HOME terminal window, execute the following command:
Shell> sqlplus west/oracle_4U @drop_tables.sql
15. Navigate to the /home/oracle/labs/Section15/sqlscripts directory. In the
GG_EURO_HOME terminal window, execute the following command:
Shell> sqlplus east/oracle_4U @drop_tables.sql

16. To set up GoldenGate Change Data Capture on the source server (GG_AMER_HOME
terminal window), configure the change data capture extract (eddl.prm) with the following
parameters:
GGSCI> edit param eddl

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 10

vi opens the eddl.prm file. Enter the following parameters:


EXTRACT EDDL
EXTTRAIL ./dirdat/ed
USERID gguser, PASSWORD oracle_4U
DDL INCLUDE MAPPED OBJNAME west.*
DDLOPTIONS ADDTRANDATA, REPORT
TABLE west.*;

Save and close the file.


17. Add the Extract Group and two Local Extract Trails by executing the following GGSCI
commands:
GGSCI> add extract eddl, tranlog, begin now
GGSCI> add exttrail ./dirdat/ed, extract eddl, megabytes 100

18. On the source server (GG_AMER_HOME terminal window), configure the Extract Data
Pump (pddl.prm) to read from the ./dirdat/ed Local Extract Trail, transmit the data to
the target server, and write it to the ./dirdat/pd Remote Trail:

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 11

vi starts and opens the pddl.prm file. Add the following run-time parameters to the text
file:
EXTRACT PDDL
RMTHOST <hostname>, MGRPORT 15001, COMPRESS
RMTTRAIL ./dirdat/pd
PASSTHRU
TABLE west.*;

Save and close the file.


19. Add the Extract Group by executing the following GGSCI commands:
GGSCI> add extract pddl, exttrailsource ./dirdat/ed
GGSCI> add rmttrail ./dirdat/pd, extract pddl, megabytes 100
20. On the target server (GG_EURO_HOME terminal window), Replicat checkpoints to a
special table created in the database. This checkpoint table ensures that the Replicat
checkpoint is part of the transaction and is used to ensure data integrity. If it does not
already exist, create the Checkpoint Table.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 12

On the target server (GG_EURO_HOME terminal window), start GGSCI and execute the
following commands:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> info checkpointtable
GGSCI> add checkpointtable
21. On the target server (GG_EURO_HOME terminal window), configure the Replicat Delivery
components by executing the following command from the GGSCI prompt:
GGSCI> edit param rddl
vi starts and opens the rddl.prm file. Add the following run-time parameters to the text
file:
REPLICAT RDDL
DISCARDFILE ./dirrpt/rddl.dsc, PURGE
ASSUMETARGETDEFS
USERID gguser, PASSWORD oracle_4U
DDL INCLUDE MAPPED
MAP west.*, TARGET east.*;
Save and close the file.
22. Add the Replicat by executing the following GGSCI command:
GGSCI> dblogin userid gguser, password oracle_4U
GGSCI> add replicat rddl, exttrail ./dirdat/pd

23. Verify the mgr process is running on both AMER and EURO.
GGSCI> info mgr
If the mgr process is not already running, start it, and then verify that it is running
GGSCI> start mgr
GGSCI> info mgr
To start the Extract and Replicat processes, issue the following command on both the
AMER and EURO instances:
GGSCI> start er *

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 13

Generate Source Database Activity


24. From a Linux shell, navigate to the /home/oracle/labs/Section15/sqlscripts
directory. Execute the following command in the GG_AMER_HOME terminal window:
Shell> sqlplus west/oracle_4U @source_database.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 14

25. Execute the following command in the GG_AMER_HOME terminal window:


Shell> sqlplus west/oracle_4U @seed_database.sql

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 15

26. Execute the following command in the GG_AMER_HOME terminal window:


Shell> sqlplus west/oracle_4U @trans_generator.sql

Wait a couple of minutes for the trans generator to complete.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 16

Validating the Results


27. In the GG_EURO_HOME terminal window, log in to SQL*Plus and execute the following
command:
SQL> select table_name from user_tables;

Six tables should exist in the EAST schema.


28. From the GG_AMER_HOME terminal window, execute the following command:
GGSCI> stats eddl, total

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 17

The stats output should show mapped DDL operations followed by transaction counts for
all tables where data was captured.
29. Execute the same command for the Replicat in the GG_EURO_HOME terminal window:
GGSCI> stats rddl, total

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 18

All counts should match.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 19

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 15: DDL Replication


Chapter 15 - Page 20

Practices for Lesson 16:


Tuning and Troubleshooting
Chapter 16

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16: Tuning and Troubleshooting


Chapter 16 - Page 1

Practices for Lesson 16


Overview
There are no practices for this Lesson.

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 16: Tuning and Troubleshooting


Chapter 16 - Page 2

S-ar putea să vă placă și