Configure GoldenGate REPLICAT Process

GOLDENGATE TUTORIAL

Configure GoldenGate REPLICAT Process

The Goldengate Replicat process also known as the apply process, is a mandatory process in the Goldengate setup. This data delivery process is the last component to be setup on the the target database. It reads the data from a file known an EXTTRAIL file which contains data changes made on the source. In addition to applying the data on the target, the Goldengate replicat also posts its exact location of the trail file while processing records. This is used for recovery from crashes, allowing it to start from the exact point where it left off, without any data loss.

Configure Golden Gate Oracle Replication (REPLICAT)

REPLICAT Parameter File
Below is the example of the GoldenGate Replicat parameter file. This file in usually placed in the $GG_HOME/dirprm directory. The GG_HOME is the home directory where GoldenGate binaries are installed and dirprm was created in the pre-requisites phase by issuing “CREATE SUBDIRS”.
REPLICAT RWHS01
ASSUMETARGETDEFS
USERID OGG_USER PASSWORD hsdgeh#die4fsG
DISCARDFILE ./dirrpt/rprt.dsc, PURGE
DDL INCLUDE ALL
MAP APPSRC01.*, TARGET APPTAR01.*

The parameters above used in the Oracle Replicat parameter file, have been explained below.

PARAMETER DESCRIPTION
REPLICAT Name of the Replicat Process
ASSUMETARGETDEFS Used to identify that the column structure of the SOURCE and TARGET tables in the MAP statement are identical
USERID Login details for the GoldenGate Database user
DISCARDFILE This file contains data records that caused an error while they are written to the TARGET databas
DDL INCLUDE MAPPED This parameter is used to ensure that the scope of the DDL transaction is of mapped scope only
MAP & TARGET Used to map SOURCE and TARGET schema. In this example the source schema name is APPSRC01 and the target schema is APPTAR01

Add REPLICAT
At the GGSCI prompt in the Golden gate home directory the following commands need to be run.
GGSCI> DBLOGIN USERID OGG_USER PASSWORD hsdgeh#die4fsG
GGSCI> ADD CHECKPOINTTABLE OGG_USER.ggschkpt
GGSCI> ADD REPLICAT RWHS01, EXTTRAIL ./dirdat/ps, BEGIN NOW, CHECKPOINTTABLE OGG_USER.ggschkpt

The DBLOGIN is used to login into the database. The EXTTRAIL parameter is used to specify the location and prefix of the EXTTRAIL file from where the Replicat process will read the data changes. Here “./dirdat/” is the EXTTRAIL path and “tt” is the prefix of EXTTRAIL file.


Start REPLICAT
In “ggsci” type the below command to start the Replicat process.
ggsci> start RWHS01

Here “RWHS01” is the name of the Replicat process.

Status of REPLICAT
In “ggsci” type the below command to check the status of the Replicat process.
ggsci> info RWHS01

ggsci> view report RWHS01

This command shows the display the status for the Replicat process.

Stopping REPLICAT
In “ggsci” type the command below to stop the GoldenGate replicat process.
ggsci> stop RWHS01
Delete REPLICAT
In “ggsci” type the command below to delete the GoldenGate replicat process.
ggsci> delete RWHS01

Monitoring and Alerting REPLICAT process

After starting the REPLICAT process you can place the alerting to make sure you know if the process goes down. Simply place script in the crontab or another scheduler to be executed at the interval that best fits your needs.

Feature Articles
My GoldenGate Home Page
Oracle GoldenGate Concepts and Architecture Made Simple!

Simple Replication Series

GoldenGate Replication Pre-requisites
GoldenGate Manager
GoldenGate Classical Extract
GoldenGate Pump
GoldenGate Replicat
Uni-directional Replication Summary
GoldenGate Alerting and Monitoring Script