Configuring databases for coordinated message flows with Sybase

If your message flow interacts with a Sybase database, and you want to coordinate the updates made to the database with other actions within the message flow, configure your broker to manage these updates.

Before you start:

To complete this task, you must have completed the following task:

Using Sybase with only 32-bit execution groups

If you want to use Sybase in coordinated transactions, follow the general instructions in the section called "Sybase configuration" in the WebSphere MQ System Administration book, and use these with the instructions given here. WebSphere Message Broker supports only Sybase Version 12_5.

  1. Ensure that the DataSourceUserid specified when the broker is created is a user ID that has been granted the Sybase role of dtm_tm_role.
  2. Use the switchfile supplied by WebSphere Message Broker. When you add the XAResourceManager configuration information for Sybase, specify:
    • UKasedtc20.so as the switchfile on AIX, Solaris, and Linux (x86 platform)
    • UKasedtc20.sl as the switchfile on HP-UX
    • UKase20.dll as the switchfile on Windows
  3. Specify the ODBC DSN name of your database in the -N parameter of the XAOpenString, the network address of your database in the -A parameter, the user name used for access in the -U parameter, and the password for that user in the -P parameter.
  4. Create the following symbolic links:
    On AIX:
    ln –s install_dir/merant/lib/libUKicu20.a /var/mqm/exits/libUKicu20.a 
    ln –s install_dir/merant/lib/UKase20.so /var/mqm/exits/UKase20.so
    ln –s install_dir/merant/lib/UKasedtc20.so /var/mqm/exits/UKasedtc20.so
    On Solaris and Linux (x86 platform):
    ln –s install_dir/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so 
    ln –s install_dir/merant/lib/UKase20.so /var/mqm/exits/UKase20.so
    ln –s install_dir/merant/lib/UKasedtc20.so /var/mqm/exits/UKasedtc20.so
    On HP-UX:
    ln –s install_dir/merant/lib/libUKicu20.sl  /var/mqm/exits/libUKicu20.sl 
    ln –s install_dir/merant/lib/UKase20.sl /var/mqm/exits/UKase20.sl
    ln –s install_dir/merant/lib/UKasedtc20.sl /var/mqm/exits/UKasedtc20.sl

Refer to the information provided for the version of WebSphere MQ that you have installed:

  • For coordination by WebSphere MQ V5:
    The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on UNIX systems, and the equivalent Windows information. In each example:
    • N is the ODBC data source name.
    • A is the TCPIP host and port on which the Sybase ASE server resides.
    • U represents the user login.
    • P represents the user ID's password.
    • On AIX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.so
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On HP-UX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.sl
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Linux (x86 platform):
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Solaris:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Windows, set the following values on the Resources page of the properties dialog for your WebSphere MQ queue manager (accessible from WebSphere MQ Services). This example assumes you have installed WebSphere Message Broker in the directory C:\WMQI:
      SwitchFile: C:\WMQI\BIN\UKase20.dll
      XAOpenString: -NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
      XACloseString:
      ThreadOfControl: THREAD
  • For coordination by WebSphere MQ V6:
    The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on UNIX systems, and the equivalent Windows information. In each example:
    • N is the ODBC data source name.
    • A is the TCPIP host and port on which the Sybase ASE server resides.
    • U represents the user login.
    • P represents the user ID's password.
    • On AIX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On HP-UX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.sl
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Linux (x86 platform):
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Solaris:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Windows, set the following values on the Resources page of the properties dialog for your WebSphere MQ queue manager (accessible from WebSphere MQ Services). This example assumes you have installed WebSphere Message Broker in the directory C:\WMQI:
      SwitchFile: C:\WMQI\BIN\UKase20.dll
      XAOpenString: -NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
      XACloseString:
      ThreadOfControl: THREAD

Using Sybase with only 64-bit execution groups

If you want to use Sybase in coordinated transactions, follow the general instructions in the section called "Sybase configuration" in the WebSphere MQ System Administration book, and use these with the instructions given here. WebSphere Message Broker supports only Sybase Version 12_5.

  1. Ensure that the DataSourceUserid specified when the broker is created is a user ID that has been granted the Sybase role of dtm_tm_role.
  2. Use the switchfile supplied by WebSphere Message Broker. When you add the XAResourceManager configuration information for Sybase, specify:
    • UKasedtc20.so as the switchfile on AIX and Solaris.
    • UKasedtc20.sl as the switchfile on HP-UX
  3. Specify the ODBC DSN name of your database in the -N parameter of the XAOpenString, the network address of your database in the -A parameter, the user name used for access in the -U parameter, and the password for that user in the -P parameter.
  4. Create the following symbolic links:
    On AIX:
    ln –s install_dir/DD64/lib/libUKicu20.a /var/mqm/exits64/libUKicu20.a
    ln –s install_dir/DD64/lib/UKase20.so /var/mqm/exits64/UKase20.so
    ln –s install_dir/DD64/lib/UKasedtc20.so /var/mqm/exits64/UKasedtc20.so
    On HP-UX:
    ln –s install_dir/DD64/lib/libUKicu20.sl /var/mqm/exits64/libUKicu20.sl
    ln –s install_dir/DD64/lib/UKase20.sl /var/mqm/exits64/UKase20.sl
    ln –s install_dir/DD64/lib/UKasedtc20.sl /var/mqm/exits64/UKasedtc20.sl
    On Solaris:
    ln –s install_dir/DD64/lib/libUKicu20.so /var/mqm/exits64/libUKicu20.so
    ln –s install_dir/DD64/lib/UKase20.so /var/mqm/exits64/UKase20.so	
    ln –s install_dir/DD64/lib/UKasedtc20.so /var/mqm/exits64/UKasedtc20.so
The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on UNIX systems, and the equivalent Windows information. In each example:
  • N is the ODBC data source name.
  • A is the TCPIP host and port on which the Sybase ASE server resides.
  • U represents the user login.
  • P represents the user ID's password.
  • On AIX:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.so
        XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
  • On HP-UX:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.sl
        XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
  • On Solaris:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.so
        XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
Related concepts
Message flows overview