Configuring databases for coordinated message flows with Sybase

If your message flow interacts with an Oracle 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 a 32 bit broker

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. Define each ODBC Data Source Name (DSN) as a Logical Resource Manager (LRM) in the Sybase XA configuration file $SYBASE/OCS-12_5/xa_config.
  2. 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.
  3. 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
  4. 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.
  5. Create the following symbolic links:
    On AIX
    ln –s <Your install directory>/merant/lib/libUKicu20.a /var/mqm/exits/libUKicu20.a 
    ln –s <Your install directory>/merant/lib/UKase20.so /var/mqm/exits/UKase20.so
    ln –s <Your install directory>/merant/lib/UKasedtc20.so /var/mqm/exits/UKasedtc20.so
    On Solaris and Linux x86 platform
    ln –s <Your install directory>/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so 
    ln –s <Your install directory>/merant/lib/UKase20.so /var/mqm/exits/UKase20.so
    ln –s <Your install directory>/merant/lib/UKasedtc20.so /var/mqm/exits/UKasedtc20.so
    On HP-UX
    ln –s <Your install directory>/merant/lib/libUKicu20.sl  /var/mqm/exits/libUKicu20.sl 
    ln –s <Your install directory>/merant/lib/UKase20.sl /var/mqm/exits/UKase20.sl
    ln –s <Your install directory>/merant/lib/UKasedtc20.sl /var/mqm/exits/UKasedtc20.sl
  • 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, uid represents the user login and pwd the user ID's password.

    • On AIX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.so
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -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> -WWinsock -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> -WWinsock -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Solaris:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=<Your install directory>/merant/lib/UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -WWinsock -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, uid represents the user login and pwd the user ID's password.

    • On AIX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On HP-UX:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.sl
          XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Linux (x86 platform):
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
          XACloseString=
          ThreadOfControl=THREAD
    • On Solaris:
      XAResourceManager:
          Name=SYBASEXA
          SwitchFile=UKasedtc20.so
          XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -WWinsock -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 a 64 bit broker

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. Define each ODBC Data Source Name (DSN) as a Logical Resource Manager (LRM) in the Sybase XA configuration file $SYBASE/OCS-12_5/xa_config.
  2. 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.
  3. 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
  4. 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.
  5. Create the following symbolic links:
    On AIX:
    ln –s <Your install directory>/DD64/lib/libUKicu20.a /var/mqm/exits64/libUKicu20.a
    ln –s <Your install directory>/DD64/lib/UKase20.so /var/mqm/exits64/UKase20.so
    ln –s <Your install directory>/DD64/lib/UKasedtc20.so /var/mqm/exits64/UKasedtc20.so
    On Solaris:
    ln –s <Your install directory>/DD64/lib/libUKicu20.so /var/mqm/exits64/libUKicu20.so
    ln –s <Your install directory>/DD64/lib/UKase20.so /var/mqm/exits64/UKase20.so	
    ln –s <Your install directory>/DD64/lib/UKasedtc20.so /var/mqm/exits64/UKasedtc20.so
    On HP-UX:
    ln –s <Your install directory>/DD64/lib/libUKicu20.sl /var/mqm/exits64/libUKicu20.sl
    ln –s <Your install directory>/DD64/lib/UKase20.sl /var/mqm/exits64/UKase20.sl
    ln –s <Your install directory>/DD64/lib/UKasedtc20.sl /var/mqm/exits64/UKasedtc20.sl

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, uid represents the user login and pwd the user ID's password.

  • On AIX:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.so
        XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
  • On HP-UX:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.sl
        XAOpenString=-NSYBASEDB -A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
  • On Solaris:
    XAResourceManager:
        Name=SYBASEXA
        SwitchFile=UKasedtc20.so
        XAOpenString=-NSYBASEDB –A<YourServerName,YourPortNumber> -WWinsock -Uuid -Ppwd -K2
        XACloseString=
        ThreadOfControl=THREAD
Related concepts
Message flows overview