Configuring BEA Tuxedo

What follows is a description of the process to configure BEA Tuxedo for use with Db2®. There are some differences that are noted based on whether Tuxedo is working with a 64-bit instance of Db2 or a 32-bit instance of Db2.

About this task

Note: There are new names for the XA switch data structures: db2xa_switch_std and db2xa_switch_static_std. There are also new names for the APIs: db2xacic and db2xacicst. The old switch data structure and API names can be used but only when working with a 32-bit instance of Db2.

Procedure

To configure Tuxedo to use Db2 as a resource manager:

  1. Install Tuxedo as specified in the documentation for that product. Ensure that you perform all basic Tuxedo configuration, including the log files and environment variables.
    You also require a compiler and the Data Server Client. Install these if necessary.
  2. At the Tuxedo server ID, set the DB2INSTANCE environment variable to reference the instance that contains the databases that you want Tuxedo to use. Set the PATH variable to include the Db2 database program directories. Confirm that the Tuxedo server ID can connect to the Db2 databases.
  3. Update the tp_mon_name database manager configuration parameter with the value TUXEDO.
  4. Add a definition for the Db2 database product to the Tuxedo resource manager definition file.
    In the examples that follow, UDB_XA is the locally-defined Tuxedo resource manager name for Db2 V9.1, and db2xa_switch_std is the Db2 database-defined name for a structure of type xa_switch_t:
    • For AIX®. In the file ${TUXDIR}/udataobj/RM, add the definition:
         # Db2
         UDB_XA:db2xa_switch_std:-L${DB2DIR} /lib -ldb2
      where {TUXDIR} is the directory where you installed Tuxedo, and {DB2DIR} is the Db2 instance directory.
    • For Windows. In the file %TUXDIR%\udataobj\rm, add the definition:
         # Db2
         UDB_XA;db2xa_switch_std;%DB2DIR%\lib\db2api.lib
      where %TUXDIR% is the directory where you installed Tuxedo, and %DB2DIR% is the Db2 instance directory.
  5. Build the Tuxedo transaction monitor server program for Db2:
    • For AIX:
         ${TUXDIR}/bin/buildtms -r UDB_XA -o ${TUXDIR}/bin/TMS_UDB
      where {TUXDIR} is the directory where you installed Tuxedo.
    • For Windows:
         XA -o UDB
  6. Build the application servers. In the examples that follow, the -r option specifies the resource manager name, the -f option (used one or more times) specifies the files that contain the application services, the -s option specifies the application service names for this server, and the -o option specifies the output server file name:
    • For AIX:
         ${TUXDIR}/bin/buildserver -r UDB_XA -f svcfile.o -s SVC1,SVC2 
            -o UDBserver
      where {TUXDIR} is the directory where you installed Tuxedo.
    • For Windows:
         XA -f svcfile.o -s SVC1,SVC2 
            -o UDBserver
      where %TUXDIR% is the directory where you installed Tuxedo.
  7. Set up the Tuxedo configuration file to reference the Db2 server. In the *GROUPS section of the UDBCONFIG file, add an entry similar to:
       UDB_GRP   LMID=simp GRPNO=3
         TMSNAME=TMS_UDB TMSCOUNT=2
         OPENINFO="UDB_XA:db=sample,uid=db2_user,pwd=db2_user_pwd"
    where the TMSNAME parameter specifies the transaction monitor server program that you built previously, and the OPENINFO parameter specifies the resource manager name. This is followed by the database name, and the Db2 database user ID and password, which are used for authentication. The application servers that you built previously are referenced in the *SERVERS section of the Tuxedo configuration file.
  8. If the application is accessing data from Db2 for z/OS®, Db2 for IBM® i, or Db2 for VM&VSE, the Db2 Connect XA concentrator is required. Keep the default setting for HOLD_CURSOR (HOLD_CURSOR=F) as outlined in "Valid Values for TPM and tp_mon_name" table in the xa_open string formats topic.
  9. Start Tuxedo:
       tmboot -y
    After the command completes, Tuxedo messages should indicate that the servers are started. In addition, if you issue the Db2 command LIST APPLICATIONS ALL, you should see two connections (in this situation) specified by the TMSCOUNT parameter in the UDB_GRP in the Tuxedo configuration file, UDBCONFIG.