Oracle GoldenGate 12.2

CHECKPRM – Oracle GoldenGate 12.2 New Feature

By September 23, 2016 No Comments
CHECKPRM – An utility to check and validate the parameter files

Prior to Oracle GoldenGate 12.2, there is no command or utility to check if the parameters which we had specified for the Extract (Primary and Secondary), Replicat and Manager processes are correct or not. We would only come to know once after we start the process. If there was some mistake in the parameter file as expected the process will abend and we will be finding the error in the report file of the abended process.

This was little difficult or uncomfortable or time extending process where we will be literally wasting time on checking the parameters manually.

From Oracle GoldenGate 12.2, a new utility is introduced called “CHECKPRM”. We can run this utility to check and validate our parameter files of the processes before the deployment avoiding errors like “Invalid Parameter” or Syntax Errors.

The syntax with complete options is below,

checkprm
[None]
[-v]
[? | help]
[parameter_file]
[-COMPONENT | -C) component_name]
[-MODE | -M) mode_name]
[-PLATFORM | -P) platform_name]
[-DATABASE | -D) database _ame]
[-VERBOSE | -V)]

To know more about the descriptions of the above options, you can refer the “Reference for Oracle GoldenGate for Windows and UNIX
12c (12.2.0.1)”. The link is below,

https://docs.oracle.com/goldengate/c1221/gg-winux/GWURF/GWURF.pdf

A simple syntax which is pretty more enough to check and validate the parameter files is below,

./checkprm ./dirprm/parameter_file_name

The checkprm resides under the Oracle GoldenGate Home directory (The directory where the OGG binaries are installed).

Below is the parameter file of my Integrated Extract Process.

GGSCI (OGGR2-1.localdomain) 8> view params INEXT

EXTRACT inext
SETENV ("ORACLE_SID=GGDB1")
SETENV ("ORACLE_HOME=/oracle/product/11.2.0.4/db_1")
USERID ggadmin, PASSWORD oracle
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100, PARALLELISM 2)
EXTTRAIL /ogg/dirdat/lt
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE veera.*;

To check if the above parameters of the INEXT process is valid, we can use the below checkprm utility as below,

1. Navigate to OGG_HOME directory. Here in my case the OGG_HOME directory is /ogg.

[oracle@OGGR2-1 ~]$ cd /ogg

2. Execute the below command and you can see the result,

[oracle@OGGR2-1 ogg]$ ./checkprm ./dirprm/inext.prm

2016-09-23 11:13:27  INFO    OGG-02095  Successfully set environment variable "ORACLE_SID=GGDB1".

2016-09-23 11:13:27  INFO    OGG-02095  Successfully set environment variable "ORACLE_HOME=/oracle/product/11.2.0.4/db_1".

2016-09-23 11:13:27  INFO    OGG-10139  Parameter file ./dirprm/inext.prm:  Validity check: PASS.

Runtime parameter validation is not reflected in the above check.

So in the above result, we can see the “Validity check: PASS”. So here the parameters which we had used have no issues and you safely go ahead and start the process.

Now, I am going to insert a invalid parameter to the parameter file of the INEXT process and check how the checkprm utility results. I have added the parameter ASSUMETARGETDEFS to the Extract Process INEXT. But this parameter is valid only for the REPLICAT process.

GGSCI (OGGR2-1.localdomain) 12> view params inext

EXTRACT inext
SETENV ("ORACLE_SID=GGDB1")
SETENV ("ORACLE_HOME=/oracle/product/11.2.0.4/db_1")
USERID ggadmin, PASSWORD oracle
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100, PARALLELISM 2)
EXTTRAIL /ogg/dirdat/lt
ASSUMETARGETDEFS
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE veera.*;

Now execute the checkprm utility to check and validate the parameter file as below,

[oracle@OGGR2-1 ogg]$ ./checkprm ./dirprm/inext.prm

2016-09-23 11:30:27  INFO    OGG-02095  Successfully set environment variable "ORACLE_SID=GGDB1".

2016-09-23 11:30:27  INFO    OGG-02095  Successfully set environment variable "ORACLE_HOME=/oracle/product/11.2.0.4/db_1".

(inext.prm) line 7: Parameter ['ASSUMETARGETDEFS'] is not valid for this configuration.

2016-09-23 11:30:27  INFO    OGG-10139  Parameter file ./dirprm/inext.prm:  Validity check: FAIL.

The results clearly shows that the “Validity check:FAIL”.

Let us check how it results if there is any spelling mistakes in the parameter file.,

GGSCI (OGGR2-1.localdomain) 16> view params inext

EXTRACT inext
SETENV ("ORACLE_SID=GGDB1")
SETENV ("ORACLE_HOME=/oracle/product/11.2.0.4/db_1")
USERID ggadmin, PASSWORD oracle
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100, PARALLELISM 2)
EXTRAIL /ogg/dirdat/lt
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE veera.*;

In the above parameter file of the process INEXT, there is a spell mistake for the parameter EXTTRAIL. Instead I had put it as EXTRAIL. Let us check how it results.,

[oracle@OGGR2-1 ogg]$ ./checkprm ./dirprm/inext.prm

2016-09-23 11:33:52  INFO    OGG-02095  Successfully set environment variable "ORACLE_SID=GGDB1".

2016-09-23 11:33:52  INFO    OGG-02095  Successfully set environment variable "ORACLE_HOME=/oracle/product/11.2.0.4/db_1".

(inext.prm) line 6: Parameter [EXTRAIL] is unrecognized and will be ignored.  No parameter definition with that name could be found.

2016-09-23 11:33:52  INFO    OGG-10139  Parameter file ./dirprm/inext.prm:  Validity check: FAIL.

Leave a Reply

© 2020 ORACLE-SCN. All Rights Reserved.

error: Content is protected !!