Posts

Showing posts with the label Oracle GoldenGate

Oracle Goldengate Issue OGG-00664 OCI Error during OCIServerAttach (status = 12547-ORA- 12547: TNS:lost contact)

 I have recently encountered this issue OGG-00664 OCI Error during OCIServerAttach (status = 12547-ORA- 12547: TNS:lost contact) After doing some research, tried several approach, finally found a solution that worked for me Approaches I tried that didn't work for me but seems to work for some people: I have also listed the approaches in the order I tried them as sometimes some configuration we applied does help to achieve our resolution in the end.  1. I noticed the os user I use to log into ggsci does not belong to the group oinstall which is the group that owns the oracle binary, so basically run the following, note that oragg is the os username that I use to run my ggsci usermod -a -G oinstall oragg 2. Add the following lines the prm files SETENV (TNS_ADMIN="<your oralce home>/network/admin") SETENV (ORACLE_SID='<your oracle sid>') SETENV (ORACLE_HOME="<your oracle home>") I also did try (NOTE: my thought process was I don't need...

Oracle Goldengate Extract and Replicat within same DB from one schema to another plus some issues and fixes

This is a quick guide for GoldenGate replication within the same database from one schema to another. Dblogin and add checkpoint table GGSCI > dblogin userid ggs_owner, password ggs_owner GGSCI > add checkpointtable ggg.chk extract parameter file: es1.prm GGSCI > edit param es1 vi mode EXTRACT es1 SETENV (ORACLE_SID=orcl) SETENV (ORACLE_HOME="/a01/app/oracle/product/11.2.0/dbhome_1") userid ggg, password ggg EXTTRAIL /gg_01/app/goldengate/product/12.1.0/dirdat/ea WILDCARDRESOLVE DYNAMIC EOFDELAY 5 TABLE S1.T1; TABLE S2.T2; replicat parameter file: rs1.prm GGSCI > edit param rs1 vi mode REPLICAT rs1 ASSUMETARGETDEFS SETENV (ORACLE_SID=orcl) SETENV (ORACLE_HOME="/a01/app/oracle/product/11.2.0/dbhome_1") REPERROR (-1, IGNORE) REPERROR (1403, IGNORE) userid ggg, password ggg dboptions nosuppresstriggers HANDLECOLLISIONS MAP S1.T1, TARGET S2.T1; MAP S1.T2, TARGET S2.T2; Configure extract process: GGSCI > ADD EXTRACT ES1, TRAN...

Oracle Goldengate Extract, Pump, and Replicat

This is just a quick demonstration of setting up extract, pump, and replicate. I prefer to edit the prm files at OS level, but we can also do GGSCI> edit param esource to enter the vi mode to create the prm file. Here are the sample prm files used in the demonstration: prm files: -------------------------------- Source: (2 processes) ~~~~~~~~~~~~~~~~ esource.prm ~~~~~~~~~ EXTRACT ESOURCE SETENV (ORACLE_SID=source) SETENV (ORACLE_HOME="/source/app/oracle/product/11.2.0.3") userid ggg, password ggg EXTTRAIL /ggSource/app/goldengate/product/12.1.0/dirdat/es --Resolves the TABLES to be replicated when they first encounter a dml operation WILDCARDRESOLVE DYNAMIC --Reduce the system I/O overhead of redolog reads EOFDELAY 5 TABLE mine.table; psource.prm ~~~~~~~~~ EXTRACT PDWDSPRD SETENV (ORACLE_SID=source) SETENV (ORACLE_HOME="/source/app/oracle/product/11.2.0.3") userid ggg, password ggg RMTHOST targetServer.example.net, MGRPO...

Oracle GoldenGate Initial Load

Goldengate version 12.1.2.1.0 At source: within your gg home directory ./ggsci GGSCI> dblogin userid <username>, password <password> GGSCI> add extract exsource, SOURCEISTABLE GGSCI> edit param exsource inside vi editor EXTRACT exsource SETENV (ORACLE_SID=orclSrc) SETENV (ORACLE_HOME="/u01/app/oracle/product/11.2.0.3") userid <gg username>, password <password> RMTHOST <remote hostname>, MGRPORT 7809 RMTFILE <Remote GG HOME>/dirdat/dp, MEGABYTES 1024, format level 4 PURGE --Reduce the system I/O overhead of redolog reads, <n> in second EOFDELAY 5 TABLE <schema>.<table name>; <ESC> then :wq to save and quit the editor GGSCI> start exsource At target: within your gg home directory ./ggsci GGSCI> add checkpointtable chk GGSCI> add replicat rtarget, exttrail <Remote GG HOME>/dirdat/dp, checkpointtable chk GGSCI> edit param rtarget inside vi...