Today I will talk about the new parameter file checks available to continue the series of blog posts about the new features of GoldenGate 12.2.

There are three themes that I will present you:

  • Checkprm utility
  • Info param
  • Getparaminfo

Checkprm utility

This utility can be used to validate a parameter file (.prm).

It is located in the home of the GoldenGate installation.

oracle@goldengate122:/u04/app/goldengate/product/12.2.0.0/DB1/ [DB1] ll | grep check
-rwxrwxr-x  1 oracle oinstall 11216170 Nov 10 17:30 checkprm

All the prm files are located in the dirprm folder in the Goldengate home.

oracle@goldengate122:/u04/app/goldengate/product/12.2.0.0/DB1/ [DB1] find -name *.prm
./dirprm/scott.prm
./dirprm/dscotti.prm
./dirprm/dpscott.prm
./dirprm/mgr.prm
./dirprm/scottint.prm

The command to use this tool is very simple : checkprm file.prm.

oracle@goldengate122:/u04/app/goldengate/product/12.2.0.0/DB1/ [DB1] checkprm dirprm/scott.prm

2016-01-19 15:56:18  INFO    OGG-10139  Parameter file dirprm/scott.prm:  Validity check: PASS.

Runtime parameter validation is not reflected in the above check.

In the above example, the tool tells that the prm file is fine.

Now we will look at a bad file. For doing this, I removed one letter in useridalias and the character “;” at the end.

oracle@goldengate122:/u04/app/goldengate/product/12.2.0.0/DB1/ [DB1] checkprm dirprm/scott_bad.prm

(scott_bad.prm) line 1: Fatal error in parser [Command 'TABLE' not terminated by semi-colon].

(scott_bad.prm) line 2: Parameter [userdalias] is unrecognized and will be ignored.  No parameter definition with that name could be found.

2016-01-19 16:38:39  INFO    OGG-10139  Parameter file dirprm/scott_bad.prm:  Validity check: FAIL.

The two first lines explain why the file fails the check. The explanation is very clear.

This utility can be used before a deployment.

Another important thing is that the tool can validate a parameter file for an another system. (Example : On Linux for a Windows system)

Info param

Unlike checkprm, it is not a new utility. It’s a gsci command.

In fact, this command can be used only for the manager process and globals file. It permits to see all details of a parameter file.

Below, an example for the port parameter :

GGSCI (goldengate122) 1> info param port

param name  : port
description : TCP IP port number for the Manager process
argument    : integer
default     : 7809
      range : 1 - 65535
options     :
component(s): MGR
mode(s)     : none
platform(s) : all platforms
versions    :
database(s) : all supported databases (on the supported platforms).
status      : current
mandatory   : false
dynamic     : false
relations   : none

The above example shows the usage for the manager process. Now we will do an example for the GLOBALS parameter file.

To do this, I will use the new parameter that I presented at the end of last year ALLOWOUTPUTDIR.

GGSCI (goldengate122) 2> info param ALLOWOUTPUTDIR

param name  : allowoutputdir
description : Allow the output trail files to be saved in the given directory or its sub directories.
argument    : string
default     : no default
options     :
component(s): GLOBALS
mode(s)     : none
platform(s) : all platforms
versions    :
    min ver : 12.2.0.1
database(s) : all supported databases (on the supported platforms).
status      : current
mandatory   : false
dynamic     : false
relations   : none

Getparaminfo

The last chapter will be on the gsci command : Getparaminfo.

In contrast to the two other chapters this command can be only use when the process works.

Getparaminfo allows to see all the parameters used by a process. Below a little example with the manager process.

GGSCI (goldengate122) 13> send mgr getparaminfo

Sending GETPARAMINFO request to MANAGER ...

GLOBALS

ggschema                             : ggadmin
checkpointtable                      : ggadmin.checkpoint
allowoutputdir                       : /u05/ggtrail/DB2/

/u04/app/goldengate/product/12.2.0.0/DB1/dirprm/mgr.prm

port                                 : 7809

Default Values

checkminutes                         : 10

We can specify this command with the parameter desired.

GGSCI (goldengate122) 14> send mgr getparaminfo port

Sending getparaminfo request to MANAGER ...

/u04/app/goldengate/product/12.2.0.0/DB1/dirprm/mgr.prm

port                                 : 7809

Default Values

This command has a last option available : file. This option allows to save the output to a file instead of the screen.

 

GGSCI (goldengate122) 15> send mgr getparaminfo file mgrfile.out

Sending getparaminfo request to MANAGER ...

GLOBALS

ggschema                             : ggadmin
checkpointtable                      : ggadmin.checkpoint
allowoutputdir                       : /u05/ggtrail/DB2/

/u04/app/goldengate/product/12.2.0.0/DB1/dirprm/mgr.prm

port                                 : 7809

Default Values

checkminutes                         : 10

The file generated is in the GoldenGate home.

oracle@goldengate122:/u04/app/goldengate/product/12.2.0.0/DB1/ [DB1] ll mgrfile.out
-rw-r----- 1 oracle oinstall 333 Jan 25 12:31 mgrfile.out

 Conclusion

Oracle provides us good tools to check the installed configuration at every time.

Times are over when we needed to check all configuration files by hand. Some problems can be identified more quickly.