Configuring transaction support - distributed systems only

You must register the database with the coordination queue manager before using the stand-alone database logger. This protects the log data by using global transactions on distributed systems. The database acts as an XA resource manager and the queue manager as an XA transaction manager.

About this task

If you are using z/OS®, do not carry out any of these steps because WebSphere® MQ File Transfer Edition for z/OS uses the Resource Recovery Service (RRS), which is a prerequisite.

Procedure

  1. Prepare the XA switch files. Complete the instructions in the following topic: JTA/JDBC coordination using WebSphere MQ classes for Java™.
    • Copy the jdbcdb2.dll file on Windows, jdbcora10.dll file on an Oracle 10g database, or jdbcora11.dll file on an Oracle 11g database, from the mq_install_directory\java\lib\jdbc directory to the mq_install_directory\exits directory.
    • On other platforms, you must link the files to the database libraries by using the makefile supplied. Depending on the exact platform and versions, you might need to modify the DB2® makefile to point to DB2LIBPATH=-L$(DB2_HOME)/lib32 instead of DB2LIBPATH=-L$(DB2_HOME)/lib. For more information, see Configuring JTA/JDBC coordination on platforms other than Windows.
  2. Configure the queue manager by adding the information similar to that in the following examples. In these examples, FTAUDIT1 is the database name, ftelog is the user name, and qgw783jhT is the user password:

    For Db2:

    XAResourceManager:
      Name=DB2DB
      SwitchFile=jdbcdb2
      XAOpenString=db=FTAUDIT1, uid=ftelog, pwd=qgw783jhT, toc=p, tpm=mq
      ThreadOfControl=PROCESS

    For Oracle:

    XAResourceManager:
      Name=OracleDB
      SwitchFile=jdbcora10
      XAOpenString=Oracle_XA+Acc=P/ftelog/qgw783jhT+SesTm=35+DB=FTAUDIT1+threads=false
      ThreadOfControl=PROCESS

    For information specific to using an Oracle database, see the following article: Adding resource manager configuration information for Oracle

    • On UNIX platforms, shut down the coordination queue manager (this shutdown does not disrupt transfers in progress on your WebSphere MQ File Transfer Edition network unless you are also using the coordination queue manager as an agent or command queue manager). Modify the coordination queue manager's qm.ini file to add an XAResourceManager stanza similar to the preceding examples.

    • On Windows, you can set these values by using WebSphere MQ Explorer.
      1. Right-click on the queue manager name in the MQ Explorer - Navigator panel. Select Properties.
      2. In the left panel select XA resource managers. Click Add.
      3. Type values similar to those values in the preceding examples into the appropriate fields. Click OK.
      4. Click Apply.
      5. Click OK.
      Note: On Windows with a Db2 database, you must add the user MUSR_MQADMIN to the DB2USERS group for the queue manager to be able to start.
  3. Start or restart the coordination queue manager.
  4. Configure the database for XA.
    • If you are using Db2 on a platform other than Windows, you do not need to do any further configuration.
    • If you are using Db2 on Windows, configure WebSphere MQ as the transaction monitor by using the following Db2 command:
      db2 UPDATE DBM CFG USING TP_MON_NAME MQ
      The MQ in this command matches the tpm=mq set in the XAOpenString of the XAResourceManager stanza above.
    • If you are using Oracle 9i, you might need to run two scripts, initxa.sql and initjvm.sql. Information about how to run these scripts is described in the following developerWorks® article: Configuring and using XA distributed transactions in WebSphere Studio
    • If you are using Oracle, the database logger's user name (ftelog in the examples) must have access to the DBA_PENDING_TRANSACTIONS table, which Oracle uses to implement XA. For example, use a command like the following to grant ftelog access:
      GRANT SELECT ON DBA_PENDING_TRANSACTIONS TO FTELOG

What to do next

For more information about completing these steps, see the following topics in the WebSphere MQ V7.0.1 product documentation and the following developerWorks article:


Task Task

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/transaction_support.htm