Total Pageviews

Add new extract in Goldengate

Summary: Add new Extract process in GoldenGate

Description:

This blog is for adding a new extract in goldengate considering few assumptions.


1. GG manager is already configured.
2. DB level metadata, table/schema trandata is configured.
3. GG user is configured and had DBA access to datatabase


Detailed steps :

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
export GG_HOME=/gghome/app/oracle/product/dbhome_2/gghome12c    
export ORACLE_SID=GGDB01
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$GG_HOME:$LD_LIBRARY_PATH:$ORACLE_HOME/bin:$PATH:.


Go to Parameter Directory:

cd ${GG_HOME}

cd dirprm

create new parameter file 

vi exggdb01.prm

Add below content in patameter file 

--- Start of Extract file 

-- Extract name --
extract exggdb01

-- Environment Detiail --
SETENV (ORACLE_HOME="/u01/app/oracle/product/12.1.0.2/dbhome_1")  
SETENV (GG_HOME="/gghome/app/oracle/product/dbhome_2/gghome12c ")      
SETENV (ORACLE_SID="GGDB01")  
 
-- GG database login detail --
userid ggadmin, password ggadmin

-- GG Memory parameter limits --
CACHEMGR, CACHESIZE 5G
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 500)
TRANLOGOPTIONS USENATIVEOBJSUPPORT

-- Extract Trail File Location --
exttrail ./dirdat/e1

-- Discard Files --
DISCARDFILE ./dirrpt/exggdb01.dsc, append, megabytes 200  
DISCARDROLLOVER AT 23:59  

 -- #Mention list if TABLES -- to extract data from
TABLE user1.table1
TABLE user1.table2
TABLE user1.table3
TABLE user2.table1
TABLE user2.table2
TABLE user2.table3

 -- #Mention list of TABLES -- to be excluded from extract 
TABLEEXCLUDE user1.table4
TABLEEXCLUDE user1.table5
TABLEEXCLUDE user1.table6
TABLEEXCLUDE user2.table4
TABLEEXCLUDE user2.table5


--- End of Extract Parameter file --- 

Go back to GGSCI console:

ggsci

GGSCI () 1> dblogin userid ggate password ggate

GGSCI (osggdb01) 1> register extract exggdb0l database

GGSCI (osggdb01) 1> add extract exggdb0l, integrated tranlog begin now

GGSCI (osggdb01) 1> add exttrail ./dirdat/f1  , extract exggdb0l

GGSCI (osggdb01) 1> start extract exggdb0l

GGSCI (osggdb01) 1> info extract  exggdb0l

GGSCI (osggdb01) 1> info extract  exggdb0l, detail

GGSCI (osggdb01) 1> info extract  exggdb0l, showch

GGSCI (osggdb01) 1> send extract  exggdb0l status

GGSCI (osggdb01) 1> view report extract  exggdb0l



No comments:

Post a Comment