Showing posts with label Golden Gate. Show all posts
Showing posts with label Golden Gate. Show all posts

Thursday, 4 May 2023

HANDLECOLLISIONS in GoldenGate

When data is replicated from a source database to a target database, conflicts can occur if the same data is modified in both databases simultaneously. For example, if a row is updated in the source database and the same row is also updated in the target database, a conflict arises."HANDLECOLLISIONS" parameter allows you to specify how these conflicts should be handled.

The "HANDLECOLLISIONS" parameter can take various values to determine the resolution strategy for conflicts. Some common values include:

ABORT: This value causes Oracle GoldenGate to abort the Replicat process when a conflict is encountered. This might be appropriate if you want to manually address conflicts before continuing replication.

SKIP: This value instructs Oracle GoldenGate to skip the conflicting transaction and continue replication with subsequent transactions.

OVERWRITE: This value allows the target transaction to overwrite the source transaction when a conflict occurs.

WARNING: This value generates a warning message and continues replication with one of the transactions.

DISCARD: This value discards the conflicting transaction without applying it to the target.

FAILONCOLLISION: This value causes Replicat to fail when a collision is encountered.

The appropriate value to use depends on your business logic and the importance of maintaining data integrity. You can set the "HANDLECOLLISIONS" parameter in your Oracle GoldenGate configuration file for the Replicat process. Here's an example:

HANDLECOLLISIONS OVERWRITE;

 

Tuesday, 7 December 2021

ERROR OGG-01117 Oracle GoldenGate Performance Metrics Server for Oracle: Received signal: Segmentation violation

Pmsrvr receives SIGSEGV and crashes after recreating datastore.

we can see below error on ggserr.log 

ERROR   OGG-01117  Oracle GoldenGate Performance Metrics Server for Oracle:  Received signal: Segmentation violation

 

Cause:

Empty dirbdb directory under GG_HOME existed when recreating datastore.

pmsrvr does not initialize the datastore completely if <GG_HOME>/dirbdb/ exists even if the directory is empty.

 

Solution:

stop jagent

stop *

stop manager

stop pmsrvr


GGSCI 14> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           

JAGENT      STOPPED                                          

PMSRVR      STOPPED                                           

EXTRACT     STOPPED     PUMP1      00:00:00      00:00:53    

EXTRACT     STOPPED     EXT1       00:00:02      00:00:53    

EXTRACT     STOPPED     EXT2       00:00:00      00:00:51    

REPLICAT    STOPPED     REPLG1     00:00:00      00:00:46    



remove or mv dirbdb with backup name

mv <GG_HOME>/dirbdb/ <GG_HOME>/dirbdb_org


Start GG Process:

GGSCI 15> start pmsrvr -initds

PMSRVR started


GGSCI 16> start manager

Manager started.


GGSCI 17> start *

Sending START request to MANAGER ...

EXTRACT PUMP1 starting

Sending START request to MANAGER ...

EXTRACT EXT1 starting

Sending START request to MANAGER ...

EXTRACT EXT2 starting

Sending START request to MANAGER ...

REPLICAT REPLG1 starting


GGSCI 18> start jagent

Sending START request to MANAGER ...

GGCMD JAGENT starting



GGSCI 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           

JAGENT      RUNNING                                           

PMSRVR      RUNNING                                           

EXTRACT     RUNNING     PUMP1      00:00:00      00:00:09    

EXTRACT     RUNNING     EXT1      00:00:03      00:00:07    

EXTRACT     RUNNING     EXT2     00:00:02      00:00:07    

REPLICAT    RUNNING     REPLG1     00:00:03      00:00:00   


 

Recreate datastore after delete old one helped to start PMSRVR without errors

Jagent unable to start PMSRVR , Stop all polling tasks. Wait for 9 second(s) and retry again. Due to Connection refused

Unable to start PMSRVR in golden gate 19.1.0.0.4

Got below error;
Fail to get Web Service Port, java.lang.Exception: PM Server is down

[2021-12-06T23:48:36.361-08:00] [JAGENT] [ERROR] [OGGMON-20348] [com.goldengate.monitor.jagent.jmx.ManagerConnectionKeeperThread] [tid: ManagerConnectionKeeper] [ecid: 0000NqJr8243z0GayxaeMG1Xfl69000001,0] Failed to establish a connection to the OGG Core Web Services-Host:HOSTIP Port:9,004. Stop all polling tasks. Wait for 9 second(s) and retry again. Due to Connection refused (Connection refused)


Cause:

There are multiple GoldenGate installations on the same host.


Solution:

cd $OGG_HOME/dirprm

ls -ltr pmsrvr-config.dat

Backup pmsrvr-config.dat, then change port <Port> to a port available.


Check file detais:

/u01/gg/dirprm> head pmsrvr-config.dat

{"config":{"network":{"serviceListeningPort":9004,"ipACL":[{"permission":"allow","address":"ANY"}]},"legacyProtocolEnabled":false,"asynchronousOperationEnabled":true,"defaultSynchronousWait":30,"workerThreadCount":5,"taskManagerEnabled":true,"csrfTokenProtectionEnabled":true,"csrfHeaderProtectionEnabled":false,"authorizationEnabled":false,"authorizationDetails":{"sessionDurationSecs":3600,"useMovingExpirationWindow":false,"movingExpirationWindowSecs":900,"common":{"allow":["Digest","x-Cert"],"customAuthorizationEnabled":true}},"security":false,"securityDetails":{"network":{"common":{"id":"OracleSSL","fipsEnabled":false,"fipsModulePath":"<not-set>"},"inbound":{"role":"server","authMode":"clientOptional_server","wrl":"file:./etc/ssl/server","wrlPassword":"","protocolVersion":"1_2","cipherSuites":"^((?!anon|RC4|NULL|3DES).)*$","crlEnabled":false,"crlStore":"file:./etc/ssl/crls.pem","certACL":[{"permission":"allow","name":"ANY"}],"sessionCachingEnabled":true,"sessionCacheDetails":{"limit":20480,"timeoutSecs":1800}},"outbound":{"role":"client","authMode":"client_server","wrl":"file:./etc/ssl/client","wrlPassword":"","protocolVersion":"1_2_Or_1_1_Or_1_0_Or_3_0","cipherSuites":"^.*$","crlEnabled":false,"crlStore":"file:./etc/ssl/crls.pem","certACL":[{"permission":"allow","name":"ANY"}],"sessionCachingEnabled":false}}},"hstsEnabled":true,"hstsDetails":"max-age=31536000;includeSubDomains","contentUrlRewrite":[{"srcUrl":"/index.html","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/$","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/content$","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/content/$","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/content/","targetUrl":"/services/v2/content/"},{"srcUrl":"/services/v2/content$","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/services/v2/content/$","targetUrl":"/services/v2/content/index.html"},{"srcUrl":"/css$","targetUrl":"/services/v2/content/css/"},{"srcUrl":"/css/$","targetUrl":"/services/v2/content/css/"},{"srcUrl":"/css/","targetUrl":"/services/v2/content/css/"},{"srcUrl":"/js$","targetUrl":"/services/v2/content/js/"},{"srcUrl":"/js/$","targetUrl":"/services/v2/content/js/"},{"srcUrl":"/js/","targetUrl":"/services/v2/content/js/"},{"srcUrl":"/favicon.ico$","targetUrl":"/services/v2/content/css/images/favicon.ico"}],"loadExtractHandler":true,"loadReplicatHandler":true,"loadDSHandler":true,"UDPReceiveBufferSize":10485760,"CollectorWaitInitTime":100,"CollectorWaitIncrement":100,"CollectorWaitMax":1500,"CollectorThreadStack":1048576,"CollectorWorkerThreads":5,"CollectorWorkerQueueLimit":10000,"MonitorTaskHBTimeout":10000,"MonitorTaskFrequency":1000,"DataStoreMemoryModel":"PrivateMemory","DataStoreSharedKey":0,"DataStoreType":"BDB","DataStoreMaxAge":0,"DataStoreMaxDBs":5000,"RepoDatastorePath":"","MessageLimit":500,"StatusChangeLimit":500}}[oracle@prodhost] 


/u01/gg/dirprm> vi pmsrvr-config.dat

Modify port from 9004 to 5504



Started jagent, jagent able to start PMSRVR process without any issue after changing port 

GGSCI> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           

JAGENT      RUNNING                                           

PMSRVR      RUNNING    

Saturday, 21 August 2021

ERROR OGG-01260 Oracle GoldenGate Capture for Oracle, No sufficient space on directories

Golden Gate extract struck from last 26 hours, tried to restart extract process but it’s not allowing to stop  

GGSCI (racnode01)> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

EXTRACT     RUNNING     DINCS3      00:00:00      00:00:03      

EXTRACT     RUNNING     EINCS3      00:00:03      26:38:07    

GGSCI (racnode01)>stop EINCS3

OGG-15163  There was a problem sending a message to EXTRACT EINCS3 (Timeout waiting for message).

Review  ggserr.log: 

2021-08-21T10:09:41.158-0700  ERROR   OGG-01260  Oracle GoldenGate Capture for Oracle, eincs3.prm:  No sufficient space on directories : de: /ACFS_OGG/gg/dirtmp, bytes: 0x00000000400000, co_uid: 0x000000029415bc, mb_uid: 0x000000002006, co: 0x00007f26cff020, mb: 0x000072f41c70, mf: 0x00007f2640140.

2021-08-21T10:09:41.158-0700  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, eincs3.prm:  PROCESS ABENDING.


Process abended with error  No sufficient space on directories : de: /ACFS_OGG/gg/dirtmp,

But in ggsci it’s still show as running , we can kill process forcefully 

GGSCI (racnode01)> kill extract EINCS3


CACHEMGR parameter is to control the amount of virtual memory and temporary disk space that is available for caching uncommitted transaction data,

Add CACHEMGR, CACHEDIRECTORY size 100G to extract param file:

GGSCI (racnode01)>edit params EINCS3 

CACHEMGR CACHESIZE 2G,CACHEDIRECTORY /ACFS_OGG/gg/dirtmp 100G

Start extract:

GGSCI (racnode01)>start EINCS3

Monitor extract lag timing:

GGSCI (racnode01)> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

EXTRACT     RUNNING     DINCS3      00:00:00      00:00:03      

EXTRACT     RUNNING     EINCS3      20:50:03      00:00:07    


GGSCI (racnode01)> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

EXTRACT     RUNNING     DINCS3      00:00:00      00:00:03      

EXTRACT     RUNNING     EINCS3      00:50:03      00:00:07    


Friday, 22 January 2021

./ggsci: error while loading shared libraries: libnnz19.so: cannot open shared object file: No such file or directory

Error while connecting to ggsci after install, due to missing shared files 

[oracle@racnode01 prddb01]$ ./ggsci

./ggsci: error while loading shared libraries: libnnz19.so: cannot open shared object file: No such file or directory

Check missing file with ldd:

'ldd' of the ggsci executable will show the following libraries missing 

[oracle@racnode01 prddb01]$ldd ggsci

libnnz19.so => not found

libclntsh.so.19.1 => not found

libclntshcore.so.19.1 => not found


Solution 1: Export Library path 

[oracle@racnode01 prddb01]$ export LD_LIBRARY_PATH=/u01/app/19.8.0.0/grid/lib:/san/gg/prddb01

[oracle@racnode01 prddb01]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle

Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO

Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29

Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

GGSCI (racnode01) 1> 


Second option: Create softlink from grid_home or oracle_home lib folder 

cd /u01/app/19.8.0.0/grid/lib

[oracle@racnode01 lib]$ ls -ltr libnnz*

-rw-r--r-- 1 root oinstall  6586360 Jul 10  2020 libnnz19.so

-rw-r--r-- 1 root oinstall  1967164 Jul 10  2020 libnnz19.a

-rw-r--r-- 1 root oinstall 20418322 Jul 10  2020 libnnzst19.a

[oracle@racnode01 lib]$ cd /san/gg/prddb01/

$ ln -s /u01/app/19.8.0.0/grid/lib/libnnz19.so libnnz19.so

$ ln -s /u01/app/19.8.0.0/grid/lib/libclntsh.so.19.1 libclntsh.so.19.1

$ ln -s /u01/app/19.8.0.0/grid/lib/libclntshcore.so.19.1 libclntshcore.so.19.1

[oracle@racnode01 prddb01]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle

Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO

Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29

Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

GGSCI (racnode01) 1> 

Monday, 31 August 2020

WARNING OGG-01933 Datastore create failed.

GGSCI (racnode01.com) 2> stop *

GGSCI (racnode01.com) 4> stop jagent

JAgent process is required by other GGS processes.

Are you sure you want to stop it (y/n)? y

 

Sending STOP request to GGCMD JAGENT ...

Request processed.

JAgent stopped.

 

GGSCI (racnode01.com) 5> stop mgr

Manager process is required by other GGS processes.

Are you sure you want to stop it (y/n)?y

 

Sending STOP request to MANAGER ...

Request processed.

Manager stopped.

GGSCI (racnode01.com) 7> delete datastore

Are you sure you want to delete the datastore? yes

 

2020-08-31 03:49:24  INFO    OGG-06492  Datastore deleted.

 

GGSCI (racnode01.com) 8> create datastore

2020-08-31 03:49:49  WARNING OGG-01933  Datastore create failed.

 

GGSCI (racnode01.com) 9> exit

/san/gg> ./ggsci 

GGSCI (racnode01.com) 1> create datastore

Profile 'Trace' added.

 

2020-08-31 03:52:00  INFO    OGG-06489  Datastore created.

 

GGSCI (racnode01.com) 2> start mgr

Manager started.

 

GGSCI (racnode01.com) 4> start *

GGSCI (racnode01.com) 6> start jagent

Monday, 6 July 2020

OGG-01172 Oracle GoldenGate Delivery for Oracle exceeded max bytes (50000000)

Goldengate replicat abended with   2020-03-28T22:02:39.377-0700  ERROR   OGG-01172  Oracle GoldenGate Delivery for Oracle, repusr1.prm:  Discard file (/ogg/dirrpt/repusr1.dsc) exceeded max bytes (50000000).

Cause: 
Discard file exceeded default size 50M, we need to update max bytes more than default size 50M manually in replicat to overcome this error 

Solution:
in 19c goldengate discard file size should be in between 1 - 4096 megabytes 

add parameter to replicat and restart replicat 
DISCARDFILE dirrpt/repusr1.dsc, APPEND, MEGABYTES 4096 


if we add more than 4096 MEGABYTES it will through error like "2020-03-28T22:11:10.164-0700  ERROR   OGG-10103  Oracle GoldenGate Delivery for Oracle, repusr1.prm:  (repusr1.prm) line 6: Parsing error, value "10000" is out of legal range (1 - 4096) for [megabytes]"

Wednesday, 18 September 2019

[JAGENT] [ERROR] [OGGMON-20415] java.lang.IllegalArgumentException: source parameter must not be null

Unable to Discover jagent in OEM with error [JAGENT] [ERROR] [OGGMON-20415] java.lang.IllegalArgumentException: source parameter must not be null

Solution:
1. Stop all goldengate process including manager and jagent
ggsci> stop jagent
ggsci> stop *
ggsci> stop manager

2.Delete datastore
ggsci> delete datastore

3.Create datastore
ggsci>create datastore

4.Start all process now
ggsci> start manager
ggsci> start *
ggsci> start jagent

Note: Datastore holds monitoring information supplied by the Oracle GoldenGate Extract, Replicat, and Manager processes

Delete and recreate datastore will help in multiple jagent monitoring issues