Configuring Informix
Informix® support and configuration information.
Complete the following steps:
- 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.
- Ensure that Informix databases are created correctly.
- Check environment variable settings.
- Build the Informix switch load file.
- Add resource manager configuration information.
Ensuring that Informix databases are created correctly
Every Informix database that is to be coordinated by an IBM MQ queue manager must be created specifying the
log
parameter. For example:
create database mydbname with log;
IBM 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
xaswit.mak
, used for creating a switch load file also sets both product installation directories. - For 32 bit UNIX and Linux® applications, use the following command:
- INFORMIXSERVER
- The name of the Informix server. For example, on UNIX and Linux systems, use:
On Windows systems, use:export INFORMIXSERVER=hostname_1
set INFORMIXSERVER=hostname_1
- ONCONFIG
- The name of the Informix server configuration file. For example, on UNIX and Linux systems, use:
On Windows systems, use:export ONCONFIG=onconfig.hostname_1
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 IBM 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 IBM 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/xatmMQ_INSTALLATION_PATH
represents the high-level directory in which IBM 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 IBM 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
:
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 IBM 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:
- Uncomment the generation of a nonthreaded switch load file.
- Comment out the generation of the threaded switch load file.