How to run diff on Informix configuration (onconfig) files

IBM introduced a new tool in Informix 11.70.xC4 called “onconfig_diff”, located under the $INFORMIXDIR/bin directory.  This tool will show you the difference between two onconfig files in an easily readable format. This tool is particularly helpful when you need to upgrade the Informix software, add new servers into a cluster environment, check replication settings between nodes, etc.

You should never delete, move or change the default onconfig template file “onconfig.std”.  The file should be copied to a different name and changes made in the new file.  The reason for that is if any parameter is missing or has been omitted from your new onconfig file, the database server either uses default  values from “onconfig_std” or calculates values that are based on other parameter values.

Usage :  

$ onconfig_diff

usage: onconfig_diff [-d] | [-c -f file_name_1 -s file_name_2]

-d      compare current onconfig to defaults

-c      compare file to another file

-f      file name

-s      second file name

Some ways that you can use the utility:

  • Compare your current onconfig with the onconfig.std of same version.
  • Compare your current onconfig with the onconfig.std of a newer version.
  • Compare two onconfig files from different servers.

Example :

(Just taken first five parameters for sampling)

$ onconfig_diff -c -f onconfig.std_1210_FC1 -s onconfig_11.50FC3

File 1: onconfig.std_1210_FC1

File 2: onconfig_11.50FC3

==========================================

Parameters Found in File 1, not in File 2

==========================================

FULL_DISK_INIT

0

NUMFDSERVERS

4

NS_CACHE

host=900,service=900,user=900,group=900

AUTO_TUNE

1

RESTORE_POINT_DIR

$INFORMIXDIR/tmp

……….

==========================================

Parameters Found in File 2, not in File 1

==========================================

DBSPACETEMP

tempdbs1

DBSERVERNAME

ONLINE

DBSERVERALIASES

ontcponline

AUTO_AIOVPS

1

AUTO_CKPTS

1

…….

==============================================

Parameters Found in both files, but different

==============================================

ROOTPATH

File 1:  $INFORMIXDIR/tmp/demo_on.rootdbs

File 2:  /dev/rootdbs_1

MIRROR

File 1:  0

File 2:  1

MIRRORPATH

File 1:  $INFORMIXDIR/tmp/demo_on.root_mirror

File 2:  /dev/rootdbs_2

PHYSFILE

File 1:  50000

File 2:  90000

LOGFILES

File 1:  6

File 2:  138

……..

===================================================================================

Share This