Configuring Sybase data sources

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

Before you begin

Before you begin

Restrictions:
  • For Sybase data sources, federated two-phase commit is only supported by Federation component installed on Windows.
  • Pass-through DDL and transparent DDL directed to Sybase both fail with an SQL910N error. Regular SQL submitted in pass-through sessions works.
Requirements:
  • The Sybase database administrator must have a license for distributed transaction management of Sybase Adaptive Server Enterprise (ASE) and must enable the feature with the following command in the isql tool:
    sp_configure 'enable dtm', 1

    Sybase ASE must be restarted for this parameter to take effect.

  • The user name that is specified in an open string must have the dtm_tm_role in the corresponding Sybase ASE. The administrative user can assign this role with the following command in the isql tool:
    sp_role "grant", dtm_tm_role, user_name
  • For a data source for Sybase Adaptive Server Enterprise (ASE) to act as a resource manager to a federated database, a logical resource manager (LRM) entry must exist in the xa_config file in the $SYBASE/$SYBASE_OCS/config directory (version 12 or later) that maps the resource manager name to the Sybase ASE name. Consult the Sybase ASE XA documentation for more information.

    The LRM name is used by the federated server in the XA OPEN string. The federated server uses the Sybase ASE node name for the LRM name.

  • Ensure that the server name specified in the XA configuration file xa_config is present in the initialization file sql.ini in the $SYBASE/ini directory.

About this task

Procedure

To configure a Sybase data source:

Procedure

  1. Install the Sybase XA library file libxadtm.dll on the federated server.
  2. Before you use federated two-phase commit functions, create the following LRM entries in the $SYBASE/$SYBASE_OCS/config/xa_config file. If you do not have write permissions for the xa_config file, create an xa_config file in another directory and set its absolute path in the XACONFIGFILE environment variable in the db2dj.ini file:
    ;one comment line is required
    lrm=lrm_name
    server=server_name

    where server_name is an entry name in the $SYBASE/ini/sql.ini file.

  3. The Sybase wrapper automatically creates the following default XA_OPEN string for Sybase data sources:
    -Nrmname -Uuserid -Ppassword
    If you need to specify other options for the XA_OPEN string, use the XA_OPEN_STRING_OPTIONS server option.