Tutorial 2: How to Configure Oracle Goldengate PUMP Process?

GOLDENGATE TUTORIAL

Configure Oracle Goldengate PUMP Process

The Oracle GoldenGate Pump process is responsible for reading the data from the local EXTTRAIL trail file (the file with data captured by extract process) and writing the data to the target system. The Pump process is an optional component of the replication mechanism and its main benefit is its usefulness in ensuring robustness in the replication configuration when there is a system or network failure. The following are the steps required to configure the Oracle GoldenGate Pump Process.

Creating Oracle GoldenGate PUMP Process

PUMP Parameter File
The PSRC01.prm parameter file is used to create the PUMP process and is stored in the $GG_HOME/dirprm directory.The GG_HOME is the home directory where the GoldenGate binaries are installed and dirprm was created in the pre-requisites phase by issuing “CREATE SUBDIRS”.
cat dirprm/PSRC01.prm
EXTRACT PSRC01
RMTHOST ggdb02, MGRPORT 7800, TIMEOUT 30
RMTTRAIL /u01/app/ggs/dirdat/ps
PASSTHRU
TABLE app_test.*;

Below is the description of the parameters used in the parameter file.

PARAMETER DESCRIPTION
RMTHOST Target host name
MGRPORT Port number of Manager running on target side
COMPRESS Used to compress the RMTTRAIL file
RMTTRAIL Location and prefix of file to be created on the target system
PASSTHRU No connection to the database is used
TABLE Data is extracted for only the schema.table name specified

Add PUMP Process
From the directory where Oracle GoldenGate software is installed, go to the GoldenGate command prompt or ggsci. At the ggsci prompt, run the commands as shown below.

GGSCI (ggdb01) 1> dblogin USERID ggsuser, password ggsuser
Successfully logged into the database.

GGSCI (ggdb01) 2> add extract PSRC01, EXTTRAILSOURCE /u01/app/ggs/dirdat/xs, begin NOW
EXTRACT added.

GGSCI (ggdb01) 3> add rmttrail /u01/app/ggs/dirdat/ps,extract PSRC01, megabytes 50
RMTTRAIL added.

EXTTRAILSOURCE used to describe the location and prefix for EXTTRAIL file, from where the pump process will read the data changes like“./dirdat/” is the EXTTRAIL path and “ST” is the prefix of EXTTRAIL file.

RMTTRAIL file which contains the data changes that the pump reads from the extract’s EXTTRAIL and writes to the target system like “./dirdat/” is the location on target system and “TT” is the prefix for RMTTRAIL file to be created.

Starting PUMP
In “ggsci” type the below command to start the PSRC01 pump process.
GGGSCI (ggdb01) 4> start PSRC01

Sending START \request to MANAGER ...
EXTRACT PSRC01 starting

Status of PUMP
In “ggsci” type the below command to check the status of the Pump process.

GGSCI (ggdb01) 5> info PSRC01
EXTRACT PSRC01 Last Started 2013-04-25 11:29 Status RUNNING
CheckpoSRC Lag 00:00:00 (updated 00:00:08 ago)
Log Read CheckpoSRC File /u01/app/ggs/dirdat/xs000004
2013-04-25 11:28:57.000000 RBA 43924453

GGSCI (ggdb01) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING PSRC01 00:00:00 00:00:04
EXTRACT RUNNING ESRC1 00:00:00 00:00:11

GGSCI (ggdb01) 7> view report PSRC01
This command shows the display the status for the Pump process.

Stopping PUMP
In “ggsci” type the below command to stop the Pump process.
ggsci> stop PSRC01

Source ggserror.log
Similar content will be seen in the GoldenGate alert log on the source when the Extract process is added.
2013-04-25 11:28:57 INFO OGG-00987 Oracle Golden gate Command SRCerpreter for Oracle: GGSCI command (oracle): add extract PSRC01 EXTTRAILSOURCE /u01/app/ggs/dirdat/xs, begin now.
2013-04-25 11:29:02 INFO OGG-00987 Oracle Golden gate Command SRCerpreter for Oracle: GGSCI command (oracle): add rmttrail /u01/app/ggs/dirdat/ps extract PSRC01, megabytes 50.
2013-04-25 11:29:07 INFO OGG-00987 Oracle Golden gate Command SRCerpreter for Oracle: GGSCI command (oracle): start PSRC01.
2013-04-25 11:29:07 INFO OGG-00963 Oracle Golden gate Manager for Oracle, mgr.prm: Command received from GGSCI on host ggdb01.vst.com:35255 (START EXTRACT PSRC01 ).
2013-04-25 11:29:07 INFO OGG-00992 Oracle Golden gate Capture for Oracle, PSRC01.prm: EXTRACT PSRC01 starting.
2013-04-25 11:29:07 INFO OGG-03035 Oracle Golden gate Capture for Oracle, PSRC01.prm: Operating system character set identified as US-ASCII. Locale: en_US_POSIX, LC_ALL: C.
2013-04-25 11:29:07 INFO OGG-01815 Oracle Golden gate Capture for Oracle, PSRC01.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ggs/dirtmp.
2013-04-25 11:29:09 WARNING OGG-01842 Oracle GoldenGate Capture for Oracle, PSRC01.prm: CACHESIZE PER DYNAMIC DETERMINATION (2G) LESS THAN RECOMMENDED: 64G (64bit system)
vm found: 3.94G
Check swap space. Recommended swap/extract: 128G (64bit system).
2013-04-25 11:29:09 INFO OGG-01014 Oracle GoldenGate Capture for Oracle, PSRC01.prm: Positioning with begin time: Apr 25, 2013 11:28:57 AM, starting record time: Apr 25, 2013 10:41:45 AM at extseqno 4, extrba 43924453.
2013-04-25 11:29:09 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, PSRC01.prm: EXTRACT PSRC01 started.
2013-04-25 11:29:12 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: EXTRACT PSRC01 starting.
2013-04-25 11:29:19 INFO OGG-01226 Oracle GoldenGate Capture for Oracle, PSRC01.prm: Socket buffer size set to 27985 (flush size 27985).
2013-04-25 11:29:19 INFO OGG-01052 Oracle GoldenGate Capture for Oracle, PSRC01.prm: No recovery is required for target file /u01/app/ggs/dirdat/ps000000, at RBA 0 (file not opened).
2013-04-25 11:29:19 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, PSRC01.prm: Output file /u01/app/ggs/dirdat/ps is using format RELEASE 11.2.

Target ggserror.log
This message is seen in the ggserror.log when the pump process on the source is started and initiates a connection to the collector process on the target.
2013-04-25 14:26:17 INFO OGG-01229 Oracle GoldenGate Collector for Oracle: Connected to ggdb01.vst.com:35373.
2013-04-25 14:26:17 INFO OGG-01669 Oracle GoldenGate Collector for Oracle: Opening /u01/app/ggs/dirdat/ps000000 (byte -1, current EOF 0).

Monitoring and Alerting PUMP process

After starting the PUMP 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.

GoldenGate Alerting and Monitoring Script

Simple Replication Series

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