Configure Informix

Informix support and configuration information.

Complete the following steps:
  1. Ensure that we 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.

For a current list of levels of Informix supported by IBM MQ, see System Requirements for IBM MQ.


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.


Check the Informix environment variable settings

Ensure that your Informix environment variables are set for queue manager processes as well as in the 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, we 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
    


Create 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, we 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\MQ\exits.

We can find xaswit.mak in the directory MQ_INSTALLATION_PATH/samp/xatm. MQ_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 we 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

We 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:

Figure 1. Sample XAResourceManager entry for Informix on UNIX
XAResourceManager:
  Name=myinformix
  SwitchFile=infswit
  XAOpenString=DB=mydbname@myinformixserver\;USER=myuser\;PASSWD=mypasswd
  ThreadOfControl=THREAD
Note: By default the sample xaswit.mak on UNIX creates a switch load file that uses threaded Informix libraries. We 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. We 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.

Parent topic: Scenario 1: Queue manager performs the coordination