Configuring Oracle Goldengate Replication

Replication between two databases requires the setting up of the Manager, Extract and Pump processes on the source database and setting up the Manager and Replicat processes on the target database. Prior to adding and starting these processes ensure that the Goldengate binaries have been installed and other Oracle GoldenGate replication prerequisites are meet. In the example below we are assuming that the source and the target databases are both Oracle (unix platform) and the environment. In this example we are using Oracle GoldenGate 11g.

The following processes will be setup on source and target databases.

Setting up Oracle GoldenGate 11g Replication

SOURCE Database

Process Description
Manager Manages all other Goldengate processes on the server.
Extract Captures data from the redo/archive logs.
Pump Copies the file to the destination.

TARGET Database

Process Description
Manager Manages all other Goldengate processes on the server.
Replicat Applies the changes captured form source to the destination database.

Setup on Source database

Create Manager process

Parameter file
Place following in the Manager parameter file in the dirprm directory.
PORT 7810
AUTORESTART ER *, RETRIES 3, WAITMINUTES 3, RESETMINUTES 10
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS
LAGCRITICALMINUTES 5
LAGREPORTMINUTES 60
LAGINFOMINUTES 0

Start the manager

ggsci> start manager

Create Extract process

Parameter file
Place following in the Extract parameter file in the dirprm directory.

EXTRACT E_SRC
USERID [email protected] PASSWORD hg#fsgG62W
EXTTRAIL ./dirdat/st
TRANLOGOPTIONS EXCLUDEUSER OGG_USER
DDL include mapped
DDLOPTIONS ADDTRANDATA
TABLE APP_OWNER.*;

Add the extract process.
ADD EXTRACT E_SRC, TRANLOG, BEGIN NOW
ADD EXTTRAIL ./dirdat/ST, EXTRACT E_SRC, megabytes 50

Start the extract process.

ggsci> start e_src

Create Pump process

Pump parameter file
Place following in the Pump parameter file in the dirprm directory
EXTRACT P_SRC
RMTHOST [ip_address], MGRPORT 7810, COMPRESS
RMTTRAIL ./DIRDAT/TT
PASSTHRU
TABLE [schema_name].*;

Add the Pump process.
ADD EXTRACT P_SRC, EXTTRAILSOURCE ./dirdat/ST, BEGIN NOW
ADD RMTTRAIL ./dirdat/TT, EXTRACT P_SRC, megabytes 50

Start the pump process.

ggsci> start p_src

Setup Target Side

Configure Manager Process
Place following in the Pump parameter file in the dirprm directory.
PORT 7810
AUTORESTART ER *, RETRIES 3, WAITMINUTES 3, RESETMINUTES 10
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS
LAGCRITICALMINUTES 5
LAGREPORTMINUTES 60
LAGINFOMINUTES 0

[/content]

Start Mgr
start mgr

Configure Replicat Process

On the TARGET database perform the steps below.


Place following in the Repicat parameter file in the dirprm directory,
REPLICAT R_SRC
ASSUMETARGETDEFS
USERID OGG_USER@[tns_name] PASSWORD ******** DISCARDFILE ./dirrpt/rprt.dsc, PURGE
DDL INCLUDE ALL
MAP [schema_name].*, TARGET [schema_name].*;
ggsci> start r_src

Replication Validation

Now create the required tables in the [schema_name] on Source database server and insert data in them and the data will be replicated to the target system’s [schema_name].

Simple Replication Series

GoldenGate Replication Pre-requisites
GoldenGate Manager
GoldenGate Classical Extract
GoldenGate Pump
GoldenGate Replicat
Uni-directional Replication Summary

Comments

  1. rkumaresan.dba@gmail.com'kumar says

    Excellent Article about Golden Gate. Am very much impressed the steps given in this article it’s very very easy to understand for anyone.

Leave a Reply

Your email address will not be published.