NASA - Transaction - Resource Manager

NAS uses resource managers to manage distributed transactions.

There is one resource manager for each database the application server can access.

NAS displays the name of each resource manager and its status (enabled or disabled).

Resource Manager Properties

Name - The NAS-referenced name for the resource manger.

Open String - The vendor-specific XOpen initialization string.

Type - Refers to database platform.

Thread Mode - Check the database documentation to determine the appropriate thread mode.

Enabled - Check to make the Resource Manager available to NAS.

To edit a resource manager:

  1. Click the Modify button.
  2. In the Name field, enter a value to distinguish the selected resource manager from other resource managers.
  3. In the OpenString field, enter the parameters for accessing a particular database.
  4. Select the type of database from the Type drop-down box
  5. Enable or disable the resource manager, by clicking the Enabled checkbox.

To add a resource manager:

  1. Click the New button.
  2. In the Name field, enter a value to distinguish the selected resource manager from other resource managers.
  3. In the OpenString field, enter the parameters for accessing a particular database.
  4. Select the type of database from the Type drop-down box
  5. Enable or disable the resource manager, by clicking the Enabled checkbox.

To view the instructions for configuring a resource manager for a specific database:





To set up a DB2 resource manager:

  1. Enter the open string in the following format: <DataSourceName,UserName,Password>
  2. Enter the following in the DB2 configuration: DB2 update dbm cfg using TP_MON_NAME libEncServer_nodce

    DB2 uses dynamic registration to participate in distributed transactions. On NT, DB2 needs to know which shared library implements the dynamic registration functions like ax_reg() and ax_unreg().
  3. Make sure $DB2DIR/lib/libdb2.so has 755 permissions. If it does not, the Java Server (KJS) process will crash when calling xa_open.
  4. Set the CURSORHOLD parameter to zero in the db2cli.ini file.
    The cursor hold feature does not work in the XA environment.
  5. In the db2cli.ini file, set DISABLEMULTITHREAD to 1.
  6. Enter the following commands to enable the logging of XA calls and/or interfaces:

db2 update dbm cfg using DIAGLEVEL 4

db2 update dbm cfg using DIAGPATH $GX_ROOTDIR/logs

NOTE: Use the REASON CODE and SUB CODE to find the cause of an error. The NAS Administrator's Guide includes a complete list of error codes.

To set up an Oracle resource manager:

  1. Enter the open string in the following format:
  2. Oracle_XA+DB=<Server_Instance>
    +Acc=P/<user name>/ <password>
    +Sqlnet=<Server Instance>
    +SesTm=<Session time out>
    +Threads=<Thread safe mode>

  3. Make sure the three required catalog tables for recovery exist. If they don’t, create them using the following script:
    <<< script not available>>>

To set up a Sybase resource manager:

  1. Name the resource manager by adding entries to xa_config. The entries should be in the following format:
    [xa]lrm=ksample_rm
    server=ksample

  1. Enter the open string in the following format:
    -U<User name> -P<Password> -N<RM name> -Txa

  2. Verify that libxa.so exists in the $SYBASE/lib directory.
  3. NOTE: XA libraries do not come by default with Sybase client libraries.

  4. Run the following scripts available in the $SYBASE/scripts/ directory:

 

xacommit.sql

xapropt.sql

 

xacompot.sql

xa_ld_q1.sql

 

xasproc.sql

xa_ld_q2.sql

Not available.

To set up a Microsoft SQL resource manager:

  1. Enter the open string in the following format:
    Tm=<transaction manager’s name>
    RmRecoverGuid=<generate and copy the guid here>


    In the NAS environment, tm is Encina; RmRecoverGuid must match the ResoureMgrID registry entry.

  2. Install and set up the Distributed Transaction Coordinator (DTC).

  3. Check that the following items are in place:
    MS DTC service exists on the server machine.
    MS DTC runs in its own process and not in process with any MTS or resource manager process.

  4. Download and install MTS SDK. This has the required modules, such as the OLE to XA mapper.

  5. Make sure the ODBC driver on your server machine is version 3.5 or higher.

  6. Make sure the following XA-related stored procedures are installed on the MS SQL Server machine where the application server connects: sp_start_xact, sp_scan_xact, sp_commit_xact or their deprecated names such as start_xact, scan_xact and commit_xact.