Oracle Goldengate Extract, Pump, and Replicat

This is just a quick demonstration of setting up extract, pump, and replicate.

I prefer to edit the prm files at OS level, but we can also do

GGSCI> edit param esource

to enter the vi mode to create the prm file.

Here are the sample prm files used in the demonstration:
prm files:
--------------------------------
Source: (2 processes)
~~~~~~~~~~~~~~~~
esource.prm
~~~~~~~~~
EXTRACT ESOURCE

SETENV (ORACLE_SID=source)
SETENV (ORACLE_HOME="/source/app/oracle/product/11.2.0.3")

userid ggg, password ggg

EXTTRAIL /ggSource/app/goldengate/product/12.1.0/dirdat/es

--Resolves the TABLES to be replicated when they first encounter a dml operation
WILDCARDRESOLVE DYNAMIC

--Reduce the system I/O overhead of redolog reads
EOFDELAY 5

TABLE mine.table;


psource.prm
~~~~~~~~~
EXTRACT PDWDSPRD

SETENV (ORACLE_SID=source)
SETENV (ORACLE_HOME="/source/app/oracle/product/11.2.0.3")

userid ggg, password ggg

RMTHOST targetServer.example.net, MGRPORT 7809
RMTTRAIL /ggTarget/app/goldengate/product/12.1.0/dirdat/se

TABLE mine.table;


Target: (1 process)
~~~~~~~~~~~~~~
rtarget.prm
~~~~~~~~
REPLICAT RTARGET

SETENV (ORACLE_SID=target)
SETENV (ORACLE_HOME="/target/app/oracle/product/11.2.0/dbhome_1")

userid ggg, password ggg
REPERROR (1403, IGNORE)
WILDCARDRESOLVE DYNAMIC
HANDLECOLLISIONS
ASSUMETARGETDEFS
MAP mine.table, TARGET yours.table;




at source:

$ ./ggsci

GGSCI> dblogin userid ggg, password ggg

GGSCI> add extract esource, tranlog, begin now

GGSCI> add exttrail /ggSource/app/goldengate/product/12.1.0/dirdat/es, extract esource

GGSCI> add extract psource, exttrailsource /ggSource/app/goldengate/product/12.1.0/dirdat/es, begin now

GGSCI> add rmttrail /ggTarget/app/goldengate/product/12.1.0/dirdat/se, extract psource

GGSCI> start esource

GGSCI> start psource

GGSCI> info all

MANAGER     RUNNING
EXTRACT     RUNNING     ESOURCE     00:00:00      00:00:05
EXTRACT     RUNNING     PSOURCE    00:00:00      00:00:06



at target:

$ ./ggsci

GGSCI> dblogin userid ggg, password ggg

GGSCI> add checkpointtable ggg.checkpoint

GGSCI> add replicat rtarget exttrail /ggTarget/app/goldengate/product/12.1.0/dirdat/se, checkpointtable ggg.checkpoint

GGSCI> start rtarget

GGSCI> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     RTARGET    00:00:03      00:00:03




Comments

  1. Thanks for the great blog. You might have Suffered from fever since your childhood but not aware of why fever come and why it repeats. Well, I have seen some tips out there you can also check.

    ReplyDelete

Post a Comment

Popular posts from this blog

MongoDB Tips: Kill long running processes

MongoDB Ops Manager Basic Installation and Configuration