WebSphere Message Brokers
File: ac00396_
Writer: Laura Cowen

Task topic

This build: July 31, 2007 21:16:33

Configuring databases for global coordination of transactions

If your message flow interacts with a database, and you want to globally coordinate the updates made to the database with other actions within the message flow, configure your databases for global coordination.

Before you start:

If you restart a user database while the broker is still running, you must restart the broker too. The broker cannot detect that the database has stopped so WebSphere MQ retains its connections to the database. When the database starts again, the broker tries and fails to use these old connections.

To configure databases for coordinated message flows, follow the instructions relevant to your database manager:

Configuring DB2 for global coordination of transactions

You must have database administrator (DBA) privileges to perform the following tasks.
To configure DB2 database instances for global coordination of transactions:
  1. Windows only: for each 32-bit instance that will be involved in the global coordination, run the following commands to set the Transaction Process Monitor name (TP_MON_NAME) to MQ:
    db2 update dbm cfg using TP_MON_NAME MQ
    db2stop
    db2start

    On UNIX and Linux (x86 platform), do not set this variable for 32-bit or 64-bit instances.

  2. Ensure that you have adequate connection resources and find out from the broker administrator whether the broker will use TCP/IP or shared memory to connect to databases.

    To use TCP/IP connections, see the example in the section about message SQL1224N in Resolving problems when using databases.

    To enable shared memory:

    1. On the DB2 server, run the following commands to turn on extended shared memory:
      export EXTSHM=ON
      db2set DB2ENVLIST=EXTSHM
      db2stop
      db2start
    2. Ensure that shared memory support is turned on in the broker environment. For more information, see Configuring global coordination with DB2 using a 32-bit queue manager or Configuring global coordination with DB2 using a 64-bit queue manager.
  3. If you are connecting a broker on a distributed platform to a DB2 instance on z/OS, you must configure DB2 Connect to enable support for global coordination. Ensure that you have already configured a DB2 alias to represent the database using DB2 Connect.

    Perform the following tasks on the system that hosts the broker:

    1. Turn on the Connection Concentrator by configuring the DB2 database manager's configuration parameters so that the value of the MAX_CONNECTIONS parameter is greater than the value of the MAX_COORDAGENTS parameter:
      db2 update dbm cfg using MAX_CONNECTIONS MAX_CONNECTIONS_value
      where MAX_CONNECTIONS_value is greater than the existing value of the MAX_COORDAGENTS parameter.
    2. Define the SPM name as the name of the system that hosts the broker:
      db2 update dbm cfg using SPM_NAME host_name
      where host_name is the TCP/IP name of the system that hosts the broker.
    3. Stop then restart DB2 on the system that hosts the broker to apply the changes:
      db2stop
      db2start
      DB2 Connect is now configured to enable global coordination of message flows that are deployed to the broker (on a distributed platform) and that access DB2 on z/OS.
The DB2 database instances are now configured for global coordination.

Configuring Oracle for global coordination of transactions

You must have database administrator (DBA) privileges to perform the following tasks.
To configure Oracle databases for global coordination of transactions:
  1. If you are using WebSphere MQ Version 6 to globally coordinate transactions, ensure that the JAVA_XA package is present on the Oracle database. This is typically done by running the initjvm.sql and initxa.sql scripts which are supplied with the Oracle installation; your database administrator (DBA) will be able to tell you if these scripts have been run. For more information, see the Oracle product documentation.
  2. Ensure that the user ID that the broker uses to access the database has the necessary Oracle privileges to access the DBA_PENDING_TRANSACTIONS view. You can grant the required access using the following Oracle SQLPLUS command:
    	grant select on DBA_PENDING_TRANSACTIONS to <userid>;
The Oracle databases are now configured for global coordination.

Configuring Sybase for global coordination of transactions

You must have database administrator (DBA) privileges to perform the following tasks.
To configure Sybase databases for global coordination of transactions:
Ensure that the user ID that the broker uses to access the database has been granted the Sybase role of dtm_tm_role.
The Sybase databases are now configured for global coordination.
Related concepts
The Transactional model
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:16:33

ac00396_ This topic's URL is: