Creating first GoldenGate data replication

Need to configure first GoldenGate data replication?

Should be hard to configure?

Which strategies should I check?

What step may I do?

Keep simple:

Start registering GoldenGate configuration in ggsci command line (CLI)

register extract E_SOURCE database
add extract E_SOURCE INTEGRATED TRANLOG, BEGIN NOW
add exttrail ./dirdat/tf, extract E_SOURCE
add extract DATAPUMP, exttrailsource ./dirdat/tf, begin now
add rmttrail ./dirdat/tf, extract DATAPUMP
add replicat R_TARGET, exttrail ./dirdat/tf, checkpoint table GGATE.OGGCKPT

Make add trandata template for all replicated tables in GG CLI

add trandata OWNER1.TABLE1 allcols
add trandata OWNER1.TABLE2 allcols
add trandata OWNER1.TABLE3 allcols
add trandata OWNER2.TABLE4 allcols
add trandata OWNER2.TABLE5 allcols

Create process prm files in dirprm folder

vi e_source.prm

--extract group--
extract e_source

--connection to database--
userid ggate@YOURSOURCEDATABASE, password YOURENCRPTEDPASSWORD, encryptkey default

--TRANLOGOPTIONS DBLOGREADER    ---- IF USING INTEGRATED EXTRACT DO NOT USE THIS

--local trail that Extract writes to--
exttrail ./dirdat/tf
 
DDL INCLUDE MAPPED

--Define your capture tables below
TABLE OWNER1.TABLE1;
TABLE OWNER1.TABLE2;
TABLE OWNER1.TABLE3;
TABLE OWNER2.TABLE4;
TABLE OWNER2.TABLE5;

vi datapump.prm

extract datapump

rmthost yourfqdnhostname.domain.com, mgrport 7809

--connection to database--
PASSTHRU

CACHEMGR CACHESIZE 1GB

rmttrail ./dirdat/tf

map *.*;

Configuring Replicat:

vi r_target.prm

--Replicat group --

replicat R_TARGET

--source and target definitions
ASSUMETARGETDEFS

--target database login --
userid ggate@YOURTARGETTNS, password YOURENCRPTEDPASSWORD, encryptkey default

DDL INCLUDE MAPPED

--Specify table mapping ---
-- With different target
map OWNER1.TABLE1,            target OWNER2.TABLE1, KEYCOLS (CUST_CODE);
map OWNER1.TABLE2,            target OWNER2.TABLE2, KEYCOLS (CUST_CODE);
map OWNER1.TABLE3,            target OWNER2.TABLE3, KEYCOLS (CUST_CODE);

-- With Wildcard - GoldenGate will AUTO MAP
map OWNER2.*,                 target OWNER2.*,  KEYCOLS (CUST_CODE);

3 Comments

  1. Pingback: Behind the scene – Integrated Capture – |GREP ORA

  2. Alex

    Hi guys, nice post! However a question.
    How do we work with the initial load of an existent records on the replicated table? Should we export and import (expdp/impdp) in which step?
    Thanks guys, Alex!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.