Provides the information required to build the IBM DB2 RM switch module.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
- Source Code
- The IBM DB2 RM switch module COBOL source file,
ESDB2XA.CBL is located by default in the
$COBDIR/src/enterpriseserver/xa directory.
Note: If you prefer to supply user credentials programatically rather than in the xa_open string, instructions for doing so are
provided in the COBOL source file in the
Customization section.
- Building the Switch Module
- The
$COBDIR/src/enterpriseserver/xa directory contains the
build batch file that you can use to build the IBM DB2 switch module:
- Copy all files from the
$COBDIR/src/enterpriseserver/xa directory (default location) to any location where you have WRITE permission.
- Change to the directory containing the copied files.
- Enter
build db2 [-o]
The optional -o parameter allows both DB2 and ODBC (accessing DB2) switch modules to be enabled in the same region.
- Build Output
- The build process produces two binary files from the
ESDB2XA.CBL COBOL source file:
ESDB2XA_S.so |
32-bit |
static |
ESDB2XA64_S.so |
64-bit |
static
|
ESDB2XA.so |
32-bit |
dynamic |
ESDB2XA64.so |
64-bit |
dynamic |
You can register an RM switch module with
Enterprise Server dynamically, or register it statically depending on which binary file you use. We recommend that you use the dynamic switch
module option, as this ensures that only active databases used in the global transaction participate in the TM/RM XA flow.
- Additional Resources
- For more information on using the IBM DB2 RM switch module, including the
open string definition and details of supported SQL operations, see the following:
- The
Database Access - DB2 ECM topic under
Additional Software Requirements
- The
Transaction Managers help topic available in the IBM RDBMS documentation.
- DB2 9.1 - The
X/Open XA Interface programming considerations help topic available in the IBM RDBMS documentation.