Monday, April 9, 2012

Basic Informix instance customization

When installing and setting up infx, you may want to customize the Informix environment.

The infx discovery service automatically detects instances and sets their basic Informix connection parameters e.g. INFORMIXDIR, INFORMIXSERVER, and ONCONFIG. You may also need to specify a DBDATE parameter, or other environment variable such as LD_LIBRARY_PATH.

It is important to make these settings before starting an instance with the infx utilities. These variables will be set before start up, as well as when executing the infx services.

infx uses a multi level approach that allows you to apply settings to just one specific instance, or to all instances.

overall config

You make local configuration changes by editing the file /infx/local/etc/config.ini. These settings will be applied to every instance.

Example contents of blank configuration you start with at install.

; config.ini
;

; instance management params
[infxenv]

; set/override environment settings
[env]

; set vars for use in template output etc
[template]
[]


config file format

The infxenv section is used to override settings of Informix connection parameters such as INFORMIXSERVER, INFORMIXDIR, and ONCONFIG, as well as infx specific parameters.

The env section is used to specify general environment parameters such as DBDATE or LD_LIBRARY_PATH.

The template section is used to set special variables that will be used in template output, such as a company name or logo.

You set variables by adding them to the appropriate section, one variable per line.

The syntax and contents of this file are documented here: http://www.infx.me/config-reference.

example: all instances

Change /infx/local/etc/config.ini in the {env] section to set a DBDATE for all instances.

... snip ...
; set/override environment settings
[env]
DBDATE=DMY4/
... snip ...

example: one instance

The format of the instance specific config file is exactly the same as the overall config file, but there is one of these for each instance.

For an instance named demo01, edit the config file /infx/inst/demo01/etc/config.ini.

These settings will only be applied when the demo01 instance is started or when an infx service is executed against it.

distributed environments

If you are managing Informix instances on multiple hosts, you can keep all the options the same by regularly transferring the /infx/local/etc files. Set up the settings on a reference server, and then send the files to remote hosts to automatically configure them.

Alternatively, don't send the /infx/local/etc files and manage settings manually on each of the remote hosts.

host specific settings

If found, infx automatically loads a config file for a specific host.

For example, the host named demo will load the file /infx/local/etc/sub-demo.ini.

The format is the same as the overall and instance specific files.

Put settings in this file that apply to one host, such as IFMX_AIXKAIO_NUM_REQ.

summary

Config files can be used to customize infx settings, instance connection settings, environment variables and template values.

Edit the appropriate config file, based on where you want the setting to take effect.

scope file
all instances /infx/local/etc/config.ini
only demo01 instance /infx/inst/demo01/etc/config.ini
only loaded on host named demo /infx/local/etc/sub-demo.ini
  • All config files have the same format.
  • When you discover new instances, be sure to make these changings before starting the instance using infx.

No comments:

Post a Comment