Posts

Showing posts with the label Oracle

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: REPERROR (1403, IGNORE) , Add trandata schema.*

I ran into some issue with goldengate where it's not taking any of the update statement, they are all sent directly to ignore when we ran view param we see this statement, basically this is handling all the issue with update and send update statement to ignore count when the process thinks it cannot handle the update statement. REPERROR (1403, IGNORE) I then commented that line and restarted the replicat process. Upon starting the process, I encountered the following 2019-08-01 12:33:45  WARNING OGG-01004  Aborted grouped transaction on AVL_RPT_FOD.ALERT_MTS_SALT, Database error 1403 (OCI Error ORA-01403: no data found, SQL <UPDATE "AVL_RPT_FOD"."ALERT_MTS_SALT" x SET x."STATUS_ID" = :a9,x."FACILITY_TYPE_ID" = :a10,x."START_DATE" = :a11,x."END_DATE" = :a12,x."WEB_MERCATOR_X" = :a13,x."WEB_MERCATOR_Y" = :a14,x."FACILITY_NAME" = :a15 WHERE x."ID" = :b0>). 2019-08-01 12...

Oracle Goldengate QuickTip

Assuming you have a set of extract and replicate process that you would like to reset after they have been running for a while, assuming the prefix for the trail file to be ex extract process: eproc replicate process: rproc trail file prefix: ex stop or kill stop eproc  stop rproc alter eproc, begin now alter eproc, etrollover normally we can simply do the following for rproc alter rproc, begin now but for some occasion, we may have discrepancy in terms of seqno of the trail file between the extract and replicat process, in this case, figure out the file extract started with, say is 300, then we do alter replicat rproc extseqno 300 alter replicat rproc extrba 0 start rproc verify the process is running fine by seeing if the processes are extract/replicating anything stats <process>

Oracle Resource Manager Implementation

This is to limit the end user from executing anything that can potentially cause the database slow down with bad queries.  set serverout on size 5555 -- -- first remove an existing active plan ALTER SYSTEM SET RESOURCE_MANAGER_PLAN =''; -- -- delete any existing plan or group -- we have to create a pending area first exec dbms_resource_manager.clear_pending_area(); exec dbms_resource_manager.create_pending_area(); exec dbms_resource_manager.DELETE_PLAN ('LIMIT_EXEC_TIME'); exec dbms_resource_manager.DELETE_CONSUMER_GROUP ('GROUP_WITH_LIMITED_EXEC_TIME'); exec DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA; exec DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA(); begin   dbms_resource_manager.create_pending_area();   --   -- we need a consumer group that maps to the desired oracle user:   dbms_resource_manager.create_consumer_group(     CONSUMER_GROUP=>'GROUP_WITH_LIMITED_EXEC_TIME',     COMMENT=>'This...

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