Configuring Informix data sources

There are several requirements and restrictions for using Informix® data sources for federated two-phase commit.

Before you begin

Before you begin

Restrictions:
  • You cannot access Informix nicknames with a mix of a two-phase commit server and a one-phase commit server in a single connection to a federated server.
  • The WITH HOLD cursor option is not supported.
  • The XA_OPEN_STRING_OPTIONS server option is not supported for Informix data sources.
Requirements:
  • The Informix database must have logging enabled.
  • The Informix XA library only allows one connection per thread. As a result, the federated server cannot access Informix data sources with multiple servers that are enabled for federated two-phase commit in a single connection. If an application needs to use multiple servers that are enabled for federated two-phase commit, complete the optional steps in the following procedure.

About this task

Procedure

To configure an Informix data source:

Procedure

  1. Run the CREATE SERVER, ALTER SERVER, or SET SERVER statement with the DB2_TWO_PHASE_COMMIT option set to Y.

    The Informix wrapper generates the following XA OPEN string automatically for Informix data sources:

    DB=dbname;RM=rmname;CON=con;USER=user;PASSWD=password
  2. Optional: If an application needs to use multiple servers that are enabled for federated two-phase commit, complete the following steps:
    1. Copy the Informix wrapper libraries: libdb2informix.a, libdb2informixF.a, and libdb2informixU.a.
    2. Define multiple instances of the Informix wrapper by specifying a different copy of the Informix wrapper libraries in the LIBRARY clause within the CREATE SERVER statement.
    3. Define each federated two-phase commit server for the different wrapper instances.
    For example:
    CREATE WRAPPER wrapper1 library 'libdb2informix.a'
    CREATE SERVER server1 type informix version 9.4 wrapper wrapper1 options 
    		(node 'inf1', dbname 'firstdb', db2_two_phase_commit 'Y');
    CREATE WRAPPER wrapper2 library 'libdb2informix2.a'
    CREATE SERVER server2 type informix version 9.4 wrapper wrapper2 options 
    		(node 'inf2', dbname 'seconddb', db2_two_phase_commit 'Y');