ERROR OGG-01264 The call to the cm_param_set() function from line 378 in cm_sp_init_common() returned an unexpected value.

2016-11-30 18:25:47 INFO OGG-01851 filecaching started: thread ID: 140714592524032.

2016-11-30 18:25:47 WARNING OGG-01262 The call to the ggDirIsWritable() function from line 2673 in cm_cachedir_add() failed with reason 'The directory /u01/goldengate/data
/mydb/cache to hold temporary cachefiles does not exist or is not writable'.

2016-11-30 18:25:47 WARNING OGG-01278 cm_param_dir: cm_memdir_add: /u01/goldengate/data/mydb/cache size: default.

2016-11-30 18:25:47 WARNING OGG-01276 cm_param_arg: BAD DIRECTORY PARAMETER: CACHEDIRECTORY /u01/goldengate/data/mydb/cache.

2016-11-30 18:25:47 WARNING OGG-01271 cm_param_parse: Bad Parameter Argument: CACHEDIRECTORY /u01/goldengate/data/mydb/cache.

2016-11-30 18:25:47 WARNING OGG-01270 cm_param_set: Bad Parameter: CACHEMGR CACHEDIRECTORY /u01/goldengate/data/mydb/cache.

Source Context :
 SourceModule : [ggapp.cachemgr]
 SourceID : [/scratch/aime/adestore/views/aime_adc4150408/oggcore/OpenSys/src/gglib/ggapp/cachemgr/cmgr_restore.c]
 SourceFunction : [cm_sp_init_common]
 SourceLine : [378]
 ThreadBacktrace : [12] elements
 : [/u01/goldengate/oracle/OGG/libgglog.so(CMessageContext::AddThreadContext()+0x1b) [0x7ffac1709f1b]]
 : [/u01/goldengate/oracle/OGG/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x134) [0x7ffac17040a4]]
 : [/u01/goldengate/oracle/OGG/libgglog.so(_MSG_ERR_CACHEOBJ_FUNCTION_FAILED(CSourceContext*, char const*, CMessageFactory::MessageDispos
ition)+0x30) [0x7ffac16e5d6e]]
 : [/u01/goldengate/oracle/OGG/extract() [0x6a189d]]
 : [/u01/goldengate/oracle/OGG/extract(CM_cache_init(pool_info*, char const*, extract_vals*)+0x58) [0x6a2718]]
 : [/u01/goldengate/oracle/OGG/extract() [0x5f3a5a]]
 : [/u01/goldengate/oracle/OGG/extract(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x60) [0x6d05b0]]
 : [/u01/goldengate/oracle/OGG/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x1
4d) [0x6d179d]]
 : [/u01/goldengate/oracle/OGG/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0xb1) [0x6d1881]]
 : [/u01/goldengate/oracle/OGG/extract(main+0x3b) [0x5f50eb]]
 : [/lib64/libc.so.6(__libc_start_main+0xfd) [0x3409a1ed1d]]
 : [/u01/goldengate/oracle/OGG/extract() [0x563159]]

2016-11-30 18:25:47 ERROR OGG-01264 The call to the cm_param_set() function from line 378 in cm_sp_init_common() returned an unexpected value.

2016-11-30 18:25:47 ERROR OGG-01668 PROCESS ABENDING.

Create the mising directory for Cache and restart the process

[gguser@newhost01 OGG] $ pwd
/u01/goldengate/oracle/OGG
[gguser@newhost01 OGG] $ mkdir -p /u01/goldengate/data/mydb/cache

ERROR OGG-02077 Extract encountered a read error in the asynchronous reader thread and is abending: Error code 3113, error message: ORA-03113: end-of-file on communication channel

Integrated Extracts are often abending with the error “ERROR   OGG-02077  Extract encountered a read error in the asynchronous reader thread and is abending: Error code 3113, error message: ORA-03113: end-of-file on communication channel”.

Simply restarting the extract process worked.

Will update this post after further research..

Goldengate MANAGER process PURGEOLDEXTRACTS is not purging old trail files

Extract process generating local trail files and  PUMP process reading them and generating remote trail files could consume significant amount disk space if they are purged on regular basis.

GoldenGate Manager process can be configured with PURGEOLDEXTRACTS  parameter to automatically cleanup the trail files after being processed by all the processes. When PURGEOLDEXTRACTS  is used, USECHECKPOINTS is default, where Manager process use checkpoints of the processes reading the trail files to purge them. MINKEEP_rule can be used in combination with USECHECKPOINTS  to keep the trail files even after being processed.

For Example:

PURGEOLDEXTRACTS /app/goldengate/data/exttrail/db1/schema1/aa, USECHECKPOINTS, MINKEEPHOURS 2
PURGEOLDEXTRACTS /app/goldengate/data/rmttrail/db1/schema1/aa, USECHECKPOINTS, MINKEEPDAY 2
PURGEOLDEXTRACTS /app/goldengate/data/exttrail/db2/schema1/aa, USECHECKPOINTS, MINKEEPFILES 2

Sometimes it could happen that the trail files not being purged even after configuring PURGEOLDEXTRACTS parameter in the Manager parameter file. Below are some of the possible reasons that why PURGEOLDEXTRACTS parameter in MANAGER process is not working.

1. Manager process does not purge trail files by default. Make sure you have proper trail file specified in the PURGEOLDEXTRACTS parameter and restart the MANAGER process.

GGSCI > view params mgr
PORT 7849
PURGEOLDEXTRACTS /app/goldengate/data/exttrail/testdb/mf*, USECHECKPOINTS, MINKEEPDAYS 5

2. Make sure the MANAGER process is running as user that have privilege to delete trail files. If not stop it and restart with appropriate user.

GGSCI > sh ps -ef | grep mgr

3. Identify the processes that are using the trail files and check they are all current and running without lag. If any of the process reading those trail files is not current, the MANAGER process will not purge trail files until they are processed.

GGSCI 1> sh date
Fri Sep 23 11:39:08 EDT 2016

GGSCI 2> info RSTESTDB
REPLICAT RSTESTDB Last Started 2016-09-12 14:54 Status RUNNING
Checkpoint Lag 23:21:52 (updated 00:00:51 ago)
Process ID 12187
Log Read Checkpoint File /app/goldengate/data/rmttrail/testdb/mf006803
 2016-09-21 12:00:59.752202 RBA 24909084

4. Delete any obsolete processes that are configured with the trail files.

GGSCI 1> sh date
Fri Sep 23 11:39:08 EDT 2016

GGSCI 5> info RNFSDD 
REPLICAT RNFSDD Last Started 2016-09-11 00:40 Status ABENDED 
Checkpoint Lag 00:00:00 (updated 1810:37:04 ago) 
Log Read Checkpoint File /app/goldengate/data/rmttrail/testdb/mf005034
2016-09-18 01:00:03.123202 RBA 2479297

5. Check if  MINKEEP_rules are met.

MINKEEPDAYS | MINKEEPHOURS | MINKEEPFILES

6. It could be a bug.

OGG 12.2 has a bug when coming to purging old trail files where if multiple PURGEOLDEXTRACTS are defined, only the first one will be satisfied.

GoldenGate Manager (MGR) Not Cleaning Up Trail Files When PURGEOLDEXTRACTS Defined Twice Or More (Doc ID 2149579.1)

In this case if multiple PURGEOLDEXTRACTS are defined, only the first one will be satisfied.

As a workaround solution, set only one PURGEOLDEXTRACTS entry at a higher directory level that will cover all the sub-directories below it.

For example, for below entires

PURGEOLDEXTRACTS /app/goldengate/data/exttrail/db1/schema1/aa, USECHECKPOINTS, MINKEEPHOURS 2
PURGEOLDEXTRACTS /app/goldengate/data/exttrail/db2/schema1/*,  USECHECKPOINTS, MINKEEPHOURS 2

Try,

PURGEOLDEXTRACTS /app/goldengate/data/exttrail/*, USECHECKPOINTS, MINKEEPHOURS 2

OGG-00303 Invalid version found in DEFGEN file: 5.0.

Recently came across an issue with the replicats abending with  when the source system Goldengate version is 12.2.0.1.1 whereas the target Goldengate version is 12.1.2.1.2.

OGG-00303  Invalid version found in DEFGEN file: 5.0.
OGG-01668  PROCESS ABENDING.

The source Goldengate version is higher than the target Goldengate version. The DEFGEN file created on 12.2 version cannot be interpreted by 12.1 version of Goldengate. In this situation, create the DEFSFILE using FORMAT RELEASE to specify the version of target Goldengate.

DEFSFILE ./dirdef/dnfsd.def, PURGE, FORMAT RELEASE 12.1
USERID ggadm@testdb, PASSWORD ******
TABLE SAMPLE.MYTABLE;

Refer to Oracle Support (Doc ID 2155977.1) for more information.

DBLOGIN – OGG-01117 Received signal: Segmentation violation (11) / Memory fault(coredump)

Encountered “OGG-01117  Received signal: Segmentation violation (11)” when trying to login into database from GGSCI.

Figured out this is because my ORACLE_HOME and LD_LIBRARY_PATH are not set appropriately.

Oracle Goldengate – Database Password Encryption

Goldengate allows to encrypt the database password in the parameter files using “ENCRYPT PASSWORD” command.

Below is the demonstration of encrypting the database password in Goldengate parameter files.

1. Go to Goldengate Home and generated encryption keys

gguser@appnode1:/app/goldengate/oracle/OGG # ./keygen 128 1
 0x154A91DC6165F780347XFXFXFC0C35E2
 
 gguser@appnode1:/app/goldengate/oracle/OGG # vi ENCKEYS
 ##KeyName KeyValue
 GoldenUserKey 0x154A91DC6165F780347XFXFXFC0C35E2
 
 chmod 400 ENCKEYS

2. Encrypt the Goldengate database user password

GGSCI (appnode1) 2> ENCRYPT PASSWORD <goldengate_password> AES128 ENCRYPTKEY GoldenUserKey
 Encrypted password: AADAAAAAAAAAAAKASEJHLIZIEDXEZDZDAIUHSHMBNDRDSBDJAASHSGUDZESGHBPIDFPJTASAUCUHJGYE
 Algorithm used: AES128

3. Use the encrypted password in the parameter files.

EXTRACT EXRA1SCM
 SETENV (ORACLE_HOME="/ORACLE/app/oracle/product/11.2.0/dbhome_2")
 SETENV (NLS_LANG = "AMERICAN_AMERICA.AL32UTF8")
 -- Userid credentials to login into database
 userid ggadm@mydatabase1 , password AADAAAAAAAAAAAKASEJHLIZIEDXEZDZDAIUHSHMBNDRDSBDJAASHSGUDZESGHBPIDFPJTASAUCUHJGYE, AES128, ENCRYPTKEY GoldenUserKey

Note: For easy maintenance during password rotation, it is better to have the login credentials in separate file and have that file included in the parameter files so that there would be only file to modified.