Start of change

Configuring databases for coordinated message flows with Oracle

If your message flow interacts with an Oracle database, and you want to coordinate the updates made to the database with other actions within the message flow, configure your broker to manage these updates.

Before you start:

To complete this task, you must have completed the following task:

The following instructions describe how to configure your Oracle data sources for XA coordination. For more information about configuring Oracle for XA coordination with WebSphere MQ, see the section called "Oracle configuration" in WebSphere MQ System Administration.

To perform XA coordination with Oracle, you can use either WebSphere MQ Version 5.3 or WebSphere MQ Version 6.0 as the transaction coordinator:

Configuring Oracle with WebSphere MQ Version 5.0 as the transaction coordinator

To configure your Oracle data sources for XA coordination using WebSphere MQ Version 5.0 as the transaction coordinator:

  1. Ensure that the user ID that is used to access the database and specified in the XAOpenString 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>;
  2. Create the following symbolic links:
    On AIX:
    ln -s install_dir/merant/lib/libUKicu20.a /var/mqm/exits/libUKicu20.a
    ln -s $ORACLE_HOME/lib/libclntsh.a /var/mqm/exits/libclntsh.a
    On HP-UX:
    ln -s install_dir/merant/lib/libUKicu20.sl /var/mqm/exits/libUKicu20.sl
    ln -s $ORACLE_HOME/lib/libclntsh.sl /var/mqm/exits/libclntsh.sl
    Start of changeOn Solaris (SPARC platform) and Linux (x86 platform):
    ln -s install_dir/merant/lib/libUKicu20.so /var/mqm/exits/libUKicu20.so
    ln -s $ORACLE_HOME/lib/libclntsh.so /var/mqm/exits/libclntsh.so
    End of change
    Start of changeOn 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
    End of change
  3. Configure the broker's queue manager with XA Resource Manager information and specify the switch file that is supplied by WebSphere Message Broker.
    • On UNIX, add an XAResourceManager stanza in the qm.ini file. The qm.ini file is located at /var/mqm/qmgrs/broker_name/qm.ini, where broker_name is the name of the broker that is associated with the queue manager. The name of the switch file depends on the operating system:
      • Start of changeOn AIX, Solaris (SPARC platform), and Linux (x86 platform), specify UKor8dtc20.soEnd of change
      • On HP-UX, specify UKor8dtc20.sl
      • Start of changeOn Solaris (x86-64 platform), specify UKoradtc20.soEnd of change
      Examples of the XAResourceManager stanza for each operating system are shown below.
    • On Windows, in WebSphere MQ Services, configure the values on the Resources page of the queue manager's Properties dialog box. The name of the switch file is UKor8dtc20.dll. An example of the values to enter on the Resources page is shown below.
Oracle is now configured for XA coordination with WebSphere MQ Version 5.3 coordinating transactions.

Examples

In the following examples:
  • install_dir is the location in which the WebSphere Message Broker run time is installed
  • 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 is the user name with which you want to connect to the data source
  • MyPassword is the password associated with the user name
  • MyDataSourceName is the ODBC data source name for the database
AIX:
XAResourceManager:
Name=OracleXA
SwitchFile=install_dir/merant/lib/UKor8dtc20.so
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
HP-UX:
XAResourceManager:
Name=OracleXA
SwitchFile=install_dir/merant/lib/UKor8dtc20.sl
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
Linux (x86 platform):
XAResourceManager:
Name=OracleXA
SwitchFile=install_dir/merant/lib/UKor8dtc20.so
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
Start of changeSolaris (SPARC platform):End of change
Start of change
XAResourceManager:  
Name=OracleXA
SwitchFile=install_dir/merant/lib/UKor8dtc20.so
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
End of change
Start of changeSolaris (x86-64 platform):End of change
Start of change
XAResourceManager:  
Name=OracleXA
SwitchFile=install_dir/merant/lib/UKoradtc20.so
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
End of change
Windows (using WebSphere MQ Services):
Field Value
SwitchFile C:\Program Files\IBM\MQSI\6.0\bin\UKor8dtc20.dll
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+
ThreadOfControl THREAD

Configuring Oracle with WebSphere MQ Version 6.0 as the transaction coordinator

To configure your Oracle data sources for XA coordination using WebSphere MQ Version 6.0 as the transaction coordinator:

  1. Ensure that the user ID that is used to access the database and specified in the XAOpenString 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>;
  2. Create the following symbolic links:
    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_HOME/lib/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
    On HP-UX:
    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_HOME/lib/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
    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_HOME/lib/libclntsh.so /var/mqm/exits/libclntsh.so
    Start of changeOn 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_HOME/lib/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
    End of change
    Start of changeOn 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
    End of change
  3. Configure the broker's queue manager with XA Resource Manager information and specify the switch file that is supplied by WebSphere Message Broker.
    • On UNIX, add an XAResourceManager stanza in the qm.ini file. The qm.ini file is located at /var/mqm/qmgrs/broker_name/qm.ini, where broker_name is the name of the broker that is associated with the queue manager. The name of the switch file depends on the operating system:
      • Start of changeOn AIX, Solaris (SPARC platform), and Linux (x86 platform), specify UKor8dtc20.soEnd of change
      • On HP-UX, specify UKor8dtc20.sl
      • Start of changeOn Solaris (x86-64 platform), specify UKoradtc20.soEnd of change
      Examples of the XAResourceManager stanza for each operating system are shown below.
    • On Windows, in WebSphere MQ Services, configure the values on the Resources page of the queue manager's Properties dialog box. The name of the switch file is UKor8dtc20.dll. An example of the values to enter on the Resources page is shown below.
Oracle is now configured for XA coordination with WebSphere MQ Version 6.0 coordinating transactions.

Examples

In the following examples:
  • install_dir is the location in which the WebSphere Message Broker run time is installed
  • 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 is the user name with which you want to connect to the data source
  • MyPassword is the password associated with the user name
  • MyDataSourceName is the ODBC data source name for the database
AIX:
XAResourceManager:
Name=OracleXA
SwitchFile=UKor8dtc20.so
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
HP-UX:
XAResourceManager:
Name=OracleXA
SwitchFile=UKor8dtc20.sl
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
Linux (x86 platform):
XAResourceManager:
Name=OracleXA
SwitchFile=UKor8dtc20.so
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
Start of changeSolaris (SPARC platform):End of change
Start of change
XAResourceManager:  
Name=OracleXA
SwitchFile=UKor8dtc20.so
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
End of change
Start of changeSolaris (x86-64 platform):End of change
Start of change
XAResourceManager:  
Name=OracleXA
SwitchFile=UKoradtc20.so
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
End of change
Windows (using WebSphere MQ Explorer):
Field Value
SwitchFile UKor8dtc20.dll
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+
ThreadOfControl THREAD
Related concepts
Message flows overview
End of change