sample extract,pump and replicate(goldengate)




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


Here we are taking
extract: EWORK
pump: PWORK
replicat:RWORK


###we are replicating schema pavan(including all tables)###
goldengate home:'/u02/app/goldengate'

source side: 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.




Configuring Extract:

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
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:
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




Target side: clone

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



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

#Add checkpoint table on target side#

Oracle GoldenGate processes extract and replicat processes perform checkpoint operations, in the event of failure, the checkpoint file or database table ensures extract and replicat re-start from the point failure avoiding re-capture and re-apply of transactions. The GGSCI command below create the checkpoint table specifying the database schema and table name.


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)
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
REPLICAT    RUNNING     RWORK       00:00:00      00:00:02



#After configuring extract, pump and replicat, try to add some sample data into tables present in schema pavan and commit on source side(test), then check for changes on the target side(clone)#

NOTE: The uncommited data will not appear on the target side






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