Configuring Informix

Informix support and configuration information.

Note: This topic is also available in IBM® MQ Version 8.0 and later versions. However, you cannot switch to a later version using the Change version list box. To go to the topic in a later version, edit the version number in the URL box in your browser.
Complete the following steps:
  1. Ensure that you have installed the appropriate Informix® client SDK:
    • 32 bit queue managers and applications require a 32 bit Informix client SDK.
    • 64 bit queue managers and applications require a 64 bit Informix client SDK.
  2. Ensure that Informix databases are created correctly.
  3. Check environment variable settings.
  4. Build the Informix switch load file.
  5. Add resource manager configuration information.
A current list of levels of Informix supported by WebSphere® MQ is provided at theIBM WebSphere MQ detailed system requirements page.

Ensuring that Informix databases are created correctly

Every Informix database that is to be coordinated by a WebSphere MQ queue manager must be created specifying the log parameter. For example:

create database mydbname with log;
WebSphere MQ queue managers are unable to coordinate Informix databases that do not have the log parameter specified on creation. If a queue manager attempts to coordinate an Informix database that does not have the log parameter specified on creation, the xa_open call to Informix fails, and a number of FFST errors are generated.

Checking the Informix environment variable settings

Ensure that your Informix environment variables are set for queue manager processes as well as in your application processes. In particular, always set the following environment variables before starting the queue manager:
INFORMIXDIR
The directory of the Informix product installation.
  • For 32 bit UNIX and Linux® applications, use the following command:
    
    export INFORMIXDIR=/opt/informix/32-bit
    
  • For 64 bit UNIX and Linux applications, use the following command:
    
    export INFORMIXDIR=/opt/informix/64-bit
    
  • For Windows applications, use the following command:
    
    set INFORMIXDIR=c:\informix
    
For systems that have 64 bit queue managers that must support both 32 bit and 64 bit applications, you need both the Informix 32 bit and 64 bit client SDKs installed. The sample makefile xaswit.mak, used for creating a switch load file also sets both product installation directories.
INFORMIXSERVER
The name of the Informix server. For example, on UNIX and Linux systems, use:

export INFORMIXSERVER=hostname_1
On Windows systems, use:

set INFORMIXSERVER=hostname_1
ONCONFIG
The name of the Informix server configuration file. For example, on UNIX and Linux systems, use:

export ONCONFIG=onconfig.hostname_1
On Windows systems, use:

set ONCONFIG=onconfig.hostname_1

Creating the Informix switch load file

To create the Informix switch load file, use the sample file xaswit.mak, which WebSphere MQ provides to build the switch load files for various database products. On Windows systems, you can find xaswit.mak in the directory MQ_INSTALLATION_PATH\tools\c\samples\xatm. MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed. To create the Informix switch load file with Microsoft Visual C++, use:

nmake /f xaswit.mak infswit.dll
The generated switch file is placed in c:\Program Files\IBM\WebSphere MQ\exits.

You can find xaswit.mak in the directory MQ_INSTALLATION_PATH/samp/xatm. MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed.

Edit xaswit.mak to uncomment the lines appropriate to the version of Informix you are using. Then execute the makefile using the command:

make -f xaswit.mak infswit

The generated 32 bit switch load file is placed in /var/mqm/exits.

The generated 64 bit switch load file is placed in /var/mqm/exits64.

Adding resource manager configuration information for Informix

You must modify the configuration information for the queue manager to declare Informix as a participant in global units of work. Modifying the configuration information for the queue manager in this way is described in more detail in Adding configuration information to the queue manager.
  • On Windows and Linux (x86 and x86-64 platforms) systems, use the WebSphere MQ Explorer. Specify the details of the switch load file in the queue manager properties panel, under XA resource manager.
  • On all other systems specify the details of the switch load file in the XAResourceManager stanza in the qm.ini file of the queue manager.
Figure 1 is a UNIX sample, showing a qm.ini XAResourceManager entry where the database to be coordinated is called mydbname, this name being specified in the XAOpenString:
Figure 1. Sample XAResourceManager entry for Informix on UNIX platforms

XAResourceManager:
  Name=myinformix
  SwitchFile=infswit
  XAOpenString=DB=mydbname@myinformixserver\;USER=myuser\;PASSWD=mypasswd
  ThreadOfControl=THREAD
Note: By default the sample xaswit.mak on UNIX platforms creates a switch load file that uses threaded Informix libraries. You must ensure that ThreadOfControl is set to THREAD when using these Informix libraries. In Figure 1, the qm.ini file XAResourceManager stanza attribute ThreadOfControl is set to THREAD. When THREAD is specified, applications must be built using the threaded Informix libraries and the WebSphere MQ threaded API libraries.

The XAOpenString attribute must contain the database name, followed by the @ symbol, and then followed by the Informix server name.

To use the nonthreaded Informix libraries, you must ensure that the qm.ini file XAResourceManager stanza attribute ThreadOfControl is set to PROCESS. You must also make the following changes to the sample xaswit.mak:
  1. Uncomment the generation of a nonthreaded switch load file.
  2. Comment out the generation of the threaded switch load file.