Configuring global coordination with Oracle using a 64-bit queue manager

To globally coordinate message flow transactions with updates in Oracle databases, configure the broker environment. This topic describes how to configure the broker environment when the broker uses a 64-bit queue manager.

Before you start:

All WebSphere MQ Version 6 queue managers on 64-bit platforms are 64-bit. 64-bit queue managers can coordinate transactions only in 64-bit mode. If the broker uses a 64-bit queue manager, you can globally coordinate message flows that are deployed to either 64-bit or 32-bit execution groups, but if you are using 32-bit execution groups you must define the data source name of the user database in both odbc.ini and odbc64.ini. If the broker uses a 64-bit queue manager or has a 64-bit execution group, the databases to which the broker connects must be 64-bit too.

To configure your broker environment for global coordination using a 64-bit queue manager as the transaction manager:

  1. On Linux (x86 platform) and UNIX only, create the following symbolic links to specify the location of the ODBC database drivers and switch file that are supplied with WebSphere Message Broker:
    On AIX:
    ln -s install_dir/merant/lib/libUKicu20.a /var/mqm/exits/libUKicu20.a
    ln -s install_dir/merant/lib/UKor8dtc20.so /var/mqm/exits/UKor8dtc20.so
    ln -s Oracle_install_dir/lib32/libclntsh.a /var/mqm/exits/libclntsh.a
    ln -s install_dir/DD64/lib/libUKicu20.a /var/mqm/exits64/libUKicu20.a
    ln -s install_dir/DD64/lib/UKoradtc20.so /var/mqm/exits64/UKor8dtc20.so
    ln -s install_dir/DD64/lib/UKora20.so /var/mqm/exits64/UKora20.so
    On HP-UX (PA-RISC platform):
    ln -s install_dir/merant/lib/libUKicu20.sl /var/mqm/exits/libUKicu20.sl
    ln -s install_dir/merant/lib/UKor8dtc20.sl /var/mqm/exits/UKor8dtc20.sl
    ln -s Oracle_install_dir/lib32/libclntsh.sl /var/mqm/exits/libclntsh.sl
    ln -s install_dir/DD64/lib/libUKicu20.sl /var/mqm/exits64/libUKicu20.sl
    ln -s install_dir/DD64/lib/UKoradtc20.sl /var/mqm/exits64/UKor8dtc20.sl
    ln -s install_dir/DD64/lib/UKora20.sl /var/mqm/exits64/UKora20.sl
    On HP-UX (Integrity platform):
    ln -s install_dir/DD64/lib/libUKicu20.so /var/mqm/exits64/libUKicu20.so
    ln -s install_dir/DD64/lib/UKoradtc20.so /var/mqm/exits64/UKor8dtc20.so
    ln -s install_dir/DD64/lib/UKora20.so /var/mqm/exits64/UKora20.so
    On Linux (x86 platform):
    ln -s install_dir/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so
    ln -s install_dir/merant/lib/UKor8dtc20.so /var/mqm/exits/UKor8dtc20.so
    ln -s Oracle_install_dir/lib32/libclntsh.so /var/mqm/exits/libclntsh.so
    On Solaris (SPARC platform):
    ln -s install_dir/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so
    ln -s install_dir/merant/lib/UKor8dtc20.so /var/mqm/exits/UKor8dtc20.so
    ln -s Oracle_install_dir/lib32/libclntsh.so /var/mqm/exits/libclntsh.so
    ln -s install_dir/DD64/lib/libUKicu20.so /var/mqm/exits64/libUKicu20.so
    ln -s install_dir/DD64/lib/UKoradtc20.so /var/mqm/exits64/UKor8dtc20.so
    ln -s install_dir/DD64/lib/UKora20.so /var/mqm/exits64/UKora20.so
    On Solaris (x86-64 platform):
    ln -s install_dir/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so
    ln -s install_dir/merant/lib/UKoradtc20.so /var/mqm/exits/UKoradtc20.so
    ln -s install_dir/merant/lib/UKora20.so /var/mqm/exits/UKora20.so
    ln -s install_dir/DD64/lib/libUKicu20.so /var/mqm/exits64/libUKicu20.so
    ln -s install_dir/DD64/lib/UKoradtc20.so /var/mqm/exits64/UKoradtc20.so
    ln -s install_dir/DD64/lib/UKora20.so /var/mqm/exits64/UKora20.so
    Where:
    • install_dir is the location in which WebSphere Message Broker is installed.
    • Oracle_install_dir is the location in which Oracle is installed; this is the same value as $ORACLE_HOME.
  2. Configure the broker's queue manager with XA Resource Manager information for each database that is involved in the transaction that the queue manager will globally coordinate. If the message flows reference message dictionaries or contain Publication nodes, you must use the same method to define XA Resource Manager information for the broker database as well as for the user databases.

    On Linux (x86 platform) and UNIX:

    1. Open the queue manager's qm.ini file in a text editor. The qm.ini file is located at /var/mqm/qmgrs/queue_manager_name/qm.ini, where queue_manager_name is the name of the broker that is associated with the queue manager.
    2. At the end of the qm.ini file, paste the following stanza:
      XAResourceManager:
      Name=OracleXA
      SwitchFile=SwitchFileName
      XAOpenString=ORACLE_XA+SQLNET=MyServerName+HostName=MyHostName+PortNumber=MyPortNumber+Sid=MySID+ACC=P/MyUserId/MyPassword+sestm=100+threads=TRUE+DataSource=MyDataSourceName+DB=MyDataSourceName+K=2+
      XACloseString=
      ThreadOfControl=THREAD
    3. On the SwitchFile line of the stanza, replace SwitchFileName with the name of the switch file for your platform. The following table shows the name of the switch file for each platform:
      Platform Switch file path
      AIX UKor8dtc20.so
      HP-UX UKor8dtc20.sl
      Linux (x86 platform) UKor8dtc20.so
      Solaris (SPARC platform) UKor8dtc20.so
      Solaris (x86-64 platform) UKoradtc20.so

      The switch file is supplied by WebSphere Message Broker.

    4. On the XAOpenString line, replace the following values with values that are appropriate for your configuration:
      • MyServerName is the name of the Oracle server.
      • MyHostName is the name of the TCP/IP host on which the Oracle database resides.
      • MyPortNumber is the TCP/IP port on which the Oracle database is listening.
      • MySID is the Oracle System Identifier (SID) of the database.
      • MyUserId must be the user name that is used by the broker to connect to the database. The user name was defined using the -u flag on the mqsicreatebroker command when creating the broker. If the -u parameter was not specified, the data source user name is the same as the broker's service user name, which was defined using the -i flag on the mqsicreatebroker command.
      • MyPassword is the password associated with the user name.
      • MyDataSourceName is the ODBC data source name for the database.
    5. Accept the default values for all the other lines in the stanza. For example, on AIX:
      XAResourceManager:
      Name=OracleXA
      SwitchFile=UKor8dtc20.so
      XAOpenString=ORACLE_XA+SQLNET=diaz+HostName=diaz.hursley.ibm.com+PortNumber=1521+Sid=diaz+ACC=P/wbrkuid/wbrkpw+sestm=100+threads=TRUE+DataSource=MYDB+DB=MYDB+K=2+
      XACloseString=
      ThreadOfControl=THREAD
    On Windows:
    1. From the Start menu, open the WebSphere MQ Explorer graphical administration tool.
    2. Open the queue manager's Properties dialog, then open the XA resource managers page.
    3. In the SwitchFile field, enter the name of the switch file, as shown in the following example:
      UKor8dtc20.dll
    4. In the XAOpenString field, paste the following string:
      ORACLE_XA+SQLNET=MyServerName+HostName=MyHostName+PortNumber=MyPortNumber+Sid=MySID+ACC=P/MyUserId/MyPassword+sestm=100+threads=TRUE+DataSource=MyDataSourceName+DB=MyDataSourceName+K=2+ 
    5. In the XAOpenString field, replace the values as appropriate for your configuration:
      • MyServerName is the name of the Oracle server.
      • MyHostName is the name of the TCP/IP host on which the Oracle database resides.
      • MyPortNumber is the TCP/IP port on which the Oracle database is listening.
      • MySID is the Oracle System Identifier (SID) of the database.
      • MyUserId must be the user name that is used by the broker to connect to the database. The user name was defined using the -u flag on the mqsicreatebroker command when creating the broker. If the -u parameter was not specified, the data source user name is the same as the broker's service user name, which was defined using the -i flag on the mqsicreatebroker command.
      • MyPassword is the password associated with the user name.
      • MyDataSourceName is the ODBC data source name for the database.
      For example:
      ORACLE_XA+SQLNET=diaz+HostName=diaz.hursley.ibm.com+PortNumber=1521+Sid=diaz+ACC=P/wbrkuid/wbrkpw+sestm=100+threads=TRUE+DataSource=MYDB+DB=MYDB+K=2+
    6. Accept the default values for all the other fields on the page.
  3. Stop then restart the queue manager to apply the changes because qm.ini is read only when the queue manager starts.
    To stop then restart the queue manager, enter the following commands, where queue_manager_name is the name of the queue manager:
    endmqm queue_manager_name
    strmqm queue_manager_name

    When the queue manager restarts, check the queue manager's log for any warnings that are associated with the restart. The log files are located in /var/mqm/qmgrs/queue_manager_name/errors, where queue_manager_name is the name of the queue manager that you restarted.

    When the queue manager restarts successfully, the changes that you made to qm.ini are applied.
Oracle is now configured for global coordination with a 64-bit queue manager coordinating transactions.
Now, you can deploy globally coordinated message flows to the broker.
Related tasks
Configuring globally coordinated message flows
Configuring global coordination of transactions (two-phase commit)
Related reference
Supported databases