Bi-directional Golden Gate


###For Installation & configuring Bi directional Golden Gate follow the steps in below link. make sure you do the same steps on both servers as that document has steps for configuring uni-diectional GoldenGate###


https://oracleinsightspk.blogspot.com/2017/10/configuring-goldengate-golden-gate-home.html


NAMING CONVENTION should be followed in any environment where we are Implementing GoldenGate#
E starts with Extract
P starts with Pump
R starts with Replicat

Here we are taking

Server 1                                                           Server 2

extract: EWORK extract: ETARGET
pump: PWORK pump: PTARGET
replicat:RTARGET                                           replicat:RWORK



###we are replicating schema pavan bi-directionally (including all tables)###

goldengate home on both servers:'/u02/app/goldengate'

Server 1: test

GGSCI (localhost.localdomain) 2> start mgr
Manager started.



GGSCI (localhost.localdomain) 1> dblogin userid ogg_user@test password oracle;
Successfully logged into database.


GGSCI (localhost.localdomain as ogg_user@test) 2> add schematrandata pavan allcols

2017-10-09 14:22:20  INFO    OGG-01788  SCHEMATRANDATA has been added on schema pavan.

2017-10-09 14:22:20  INFO    OGG-01976  SCHEMATRANDATA for scheduling columns has been added on schema pavan.

2017-10-09 14:22:21  INFO    OGG-01977  SCHEMATRANDATA for all columns has been added on schema pavan.



GGSCI (localhost.localdomain as ogg_user@test) 2> add tracetable ogg_user.oggs_trc

Successfully created trace table OGG_USER.OGGS_TRC.




###add the following parameter in both extract and replicate param file on server 1####

TRACETABLE ogg_user.oggs_trc




Configuring Extract: EWORK

GGSCI (localhost.localdomain as ogg_user@test) 4> add extract ework, tranlog, begin now


EXTRACT  added.


GGSCI (localhost.localdomain as ogg_user@test) 4>add exttrail /u02/app/goldengate/dirdat/lt, extract ework, megabytes 500

EXTTRAIL added.



GGSCI (localhost.localdomain as ogg_user@test) 4> edit param ework

--GGSCI (localhost.localdomain as ogg_user@test) 25> add extract ework, tranlog, begin now
--GGSCI (localhost.localdomain as ogg_user@test) 26> add exttrail /u02/app/goldengate/dirdat/lt, extract ework, megabytes 500

extract ework
userid ogg_user, password oracle
exttrail /u02/app/goldengate/dirdat/lt
discardfile /u02/app/goldengate/dirdat/ework.dsc, megabytes 100, append
discardrollover at 06:00 on saturday
TRANLOGOPTIONS INCLUDEREGIONID
TRACETABLE ogg_user.oggs_trc
table pavan.*;

GGSCI (localhost.localdomain as ogg_user@test) 4> start extract ework

Sending START request to MANAGER ...
EXTRACT EWORK starting

GGSCI (localhost.localdomain as ogg_user@test) 52> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EWORK       00:00:00      00:00:04



Configuring Pump: PWORK

GGSCI (localhost.localdomain as ogg_user@test) 31> add extract pwork, exttrailsource /u02/app/goldengate/dirdat/lt, begin now

EXTRACT added.


GGSCI (localhost.localdomain as ogg_user@test) 32> add rmttrail /u02/app/goldengate/dirdat/rt, extract pwork, megabytes 500

RMTTRAIL added.


GGSCI (localhost.localdomain as ogg_user@test) 32>  edit param pwork

--GGSCI (localhost.localdomain as ogg_user@test) 31> add extract pwork, exttrailsource /u02/app/goldengate/dirdat/lt, begin now

--GGSCI (localhost.localdomain as ogg_user@test) 32> add rmttrail /u02/app/goldengate/dirdat/rt, extract pwork, megabytes 500

extract pwork
userid ogg_user, password oracle
reportcount every 24 hours, rate
discardfile /u02/app/goldengate/dirdat/pwork.dsc, megabytes 100, append
discardrollover at 06:00 on saturday
rmthost 192.168.56.103 mgrport 7809
rmttrail /u02/app/goldengate/dirdat/rt
table pavan.*;


GGSCI (localhost.localdomain as ogg_user@test) 4> start extract pwork

Sending START request to MANAGER ...
EXTRACT PWORK starting



GGSCI (localhost.localdomain as ogg_user@test) 52> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EWORK       00:00:00      00:00:04
EXTRACT     RUNNING     PWORK       00:00:00      00:00:03






Server 2: clone

GGSCI (localhost.localdomain) 2> start mgr
Manager started.



GGSCI (localhost.localdomain) 1> dblogin userid ogg_user@clone password oracle;
Successfully logged into database.


GGSCI (localhost.localdomain as ogg_user@clone) 2> add schematrandata pavan allcols

2017-10-09 14:22:20  INFO    OGG-01788  SCHEMATRANDATA has been added on schema pavan.

2017-10-09 14:22:20  INFO    OGG-01976  SCHEMATRANDATA for scheduling columns has been added on schema pavan.

2017-10-09 14:22:21  INFO    OGG-01977  SCHEMATRANDATA for all columns has been added on schema pavan.


GGSCI (clone.localdomain as ogg_user@clone) 2> add tracetable ogg_user.oggs_trc

Successfully created trace table OGG_USER.OGGS_TRC.



###add the following parameter in both extract and replicate param file in server 2 ###


TRACETABLE ogg_user.oggs_trc




Configuring Extract: ETARGET


GGSCI (clone.localdomain as ogg_user@clone) 3> edit param etarget

--GGSCI (localhost.localdomain as ogg_user@clone) 25> add extract etarget, tranlog,
 begin now
--GGSCI (localhost.localdomain as ogg_user@clone) 26> add exttrail /u02/app/golde
ngate/dirdat/lt, extract etarget, megabytes 500

extract etarget
userid ogg_user, password oracle
exttrail /u02/app/goldengate/dirdat/lt
discardfile /u02/app/goldengate/dirdat/etarget.dsc, megabytes 100, append
discardrollover at 06:00 on saturday
TRANLOGOPTIONS INCLUDEREGIONID
TRANLOGOPTIONS MINEFROMSNAPSHOTSTBY
TRACETABLE ogg_user.oggs_trc
table pavan.*;


GGSCI (localhost.localdomain as ogg_user@clone) 4> start extract etarget

Sending START request to MANAGER ...
EXTRACT ETARGET starting

GGSCI (localhost.localdomain as ogg_user@clone) 52> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     ETARGET     00:00:00      00:00:04



Configuring Pump: PTARGET


GGSCI (clone.localdomain as ogg_user@clone) 4> edit param ptarget

--GGSCI (localhost.localdomain as ogg_user@clone) 31> add extract ptarget, exttrail
source /u02/app/goldengate/dirdat/lt, begin now

--GGSCI (localhost.localdomain as ogg_user@clone) 32> add rmttrail /u02/app/golde
ngate/dirdat/rt, extract ptarget, megabytes 500

extract ptarget
userid ogg_user, password oracle
reportcount every 24 hours, rate
discardfile /u02/app/goldengate/dirdat/ptarget.dsc, megabytes 100, append
discardrollover at 06:00 on saturday
rmthost 192.168.56.101 mgrport 7810
rmttrail /u02/app/goldengate/dirdat/rt
table pavan.*;


GGSCI (localhost.localdomain as ogg_user@clone) 4> start extract ptarget

Sending START request to MANAGER ...
EXTRACT PTARGET starting

GGSCI (localhost.localdomain as ogg_user@clone) 52> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     ETARGET     00:00:00      00:00:04
EXTRACT     RUNNING     PTARGET     00:00:00      00:00:04






Server 1: test


Configuring replicat: RTARGET

#Add checkpoint table on server 1 side#
GGSCI (localhost.localdomain as ogg_user@test) 2>add checkpointtable ogg_user.ckptab


GGSCI (localhost.localdomain as ogg_user@test) 6> view param rtarget

--add replicat rtarget, exttrail /u02/app/goldengate/dirdat/rt, checkpointtable og
g_user.ckptab
replicat rtarget
assumetargetdefs
userid ogg_user, password oracle
reportcount every 24 hours, rate
discardfile /u02/app/goldengate/dirdat/rtarget.dsc, megabytes 100, append
discardrollover at 21:00
reperror(default, discard)
TRACETABLE ogg_user.oggs_trc
map pavan.*, target pavan.*;



GGSCI (localhost.localdomain as ogg_user@test) 4> start replicat rtarget

Sending START request to MANAGER ...
REPLICAT RTARGET starting



GGSCI (localhost.localdomain as ogg_user@test) 52> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EWORK       00:00:00      00:00:04
EXTRACT     RUNNING     PWORK       00:00:00      00:00:03
REPLICAT    RUNNING     RTARGET     00:00:00      00:00:02



Server 2: clone


Configuring replicat: RWORK

#Add checkpoint table on target side#
GGSCI (localhost.localdomain as ogg_user@clone) 2>add checkpointtable ogg_user.ckptab



GGSCI (localhost.localdomain as ogg_user@clone) 2>add replicat rwork, exttrail /u02/app/goldengate/dirdat/rt, checkpointtable ogg_user.ckptab


GGSCI (localhost.localdomain as ogg_user@clone) 2> edit param rwork


--add replicat rwork, exttrail /u02/app/goldengate/dirdat/rt, checkpointtable ogg_user.ckptab

replicat rwork
assumetargetdefs
userid ogg_user, password oracle
reportcount every 24 hours, rate
discardfile /u02/app/goldengate/dirdat/rwork.dsc, megabytes 100, append
discardrollover at 21:00
reperror(default, discard)
TRACETABLE ogg_user.oggs_trc
map pavan.*, target pavan.*;


GGSCI (localhost.localdomain as ogg_user@clone) 4> start replicat rwork

Sending START request to MANAGER ...
REPLICAT RWORK starting

GGSCI (clone.localdomain as ogg_user@clone) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     ETARGET     00:00:00      00:00:04
EXTRACT     RUNNING     PTARGET     00:00:00      00:00:04
REPLICAT    RUNNING      RWORK        00:00:00      00:00:02


Comments

Popular posts from this blog

Oracle Database Client(12.1.0.2.0) Installation for Microsoft Windows(x64)

configuring goldengate

Configuring oracle enterprise manager express 12c