Tags

,

Install goldengate with below given steps:

— Download the latest GG binaries for respective oracle version.
— Unzip in GG home directory.
— Set environment variables:
— GG_HOME
— ORACLE_HOME
— LD_LIBRARY_PATH
— Login to ggsci, create subdirs.
— SUBDIR include dirdat (trailfiles), dirrpt(report files), dirchk(checkpoit),                         dirtmp(temporary files).

Before going further, enable supplemental logging database:
— Enable Minimal Supplemental logging:
SQL>alter database add supplemental log data;
— Enable Force logging:
SQL>alter database forcelogging;
SQL>select force_logging, supplemental_log_data_min from v$database; ## Both should be ##

 

Next step is to configure the GG processes, and register the processes in the database.

— Login GGSCI and configure manager process
ggsci> edit params mgr

define port

PORT 7894
ggsci> start mgr
— Login the database.
ggsci>dblogin userid <username>, password <password>
— Create Extract
ggsci> add extract ext1, tranlog, begin now
eg:
— Configure Extract:
DBLOGIN userid <username>, password <passwd>
ADD EXTRACT EXT1, TRANLOG, BEGIN NOW
ADD EXTTRAIL ./dirdat/ee, extract ext1, megabytes 1024
edit params ext1
EXTRACT EXT1
SETENV (ORACLE_HOME = “<Oracle home path>” )
SETENV (ORACLE_SID=”<Oracle sid>”)
USERID GGOWN, PASSWORD GGOWN
EXTTRAIL ./dirdat/ee
discardfile ./dirdsc/ext1.dsc, append
TRANLOGOPTIONS ASMUSER sys@<connect string>, ASMPASSWORD <password>
REPORTROLLOVER AT <hh:mi> on <day of the week>
REPORTCOUNT EVERY <n> HOURS, RATE
WARNLONGTRANS 1h, CHECKINTERVAL 15m
DDL INCLUDE MAPPED
TABLE SCHEMA.*;

— Configure extract pump
ADD EXTRACT EPMP, EXTTRAILSOURCE ./dirdat/ee, EXTRACT EXT1
ADD RMTTRAIL ./dirdat/ep, extract epmp
edit param epmp
EXTRACT EPMP
SETENV (ORACLE_HOME = “<Oracle home path>” )
SETENV (ORACLE_SID=”<Oracle sid>”)
PASSTHRU
RMTHOST test1.dmp.com, PORT <PORT#>
RMTTRAIL ./dirdat/ep — Most cases use full path.
TABLE SCHEMA.*;

— Start the extract and pump. Save the start info like Current trail, RBA POS etc.
— Almost same steps need to be followed on target for GG setup.

— Configure replicat to read the trails.
— edit param ./GLOBALS
GGSCHEMA GGOWN
CHECKPOINTTABLE GGOWN.CKPT_TBL
— Add checkpoint:
dblogin userid GGOWN, password GGOWN
add replicat rep1, exttrail ./dirdat/ep, checkpointtable ggown.CKPT_TBL
alter replicat rep1, begin now
edit param rep1
replicat rep1
SETENV (ORACLE_HOME = “<Oracle home path>” )
SETENV (ORACLE_SID=”<Oracle sid>”)
userid GGOWN, password GGOWN
ASSUMETARGETDEFS
DISCARDFILE ./dirdsc/rep1.dsc, append
ddloptions report
handlecollisions — Temporary for initial startup
DDL INCLUDE MAPPED
REPORTCOUNT EVERY <n> HOURS, RATE
dynamicresolution
MAP schema.*, target schema.*;

— Start the replicat using AFTERCSN and monitor the apply rate.