If your message flow interacts with a DB2 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:
db2 update dbm cfg using TP_MON_NAME MQYou must not set this parameter if you are using a 64-bit DB2 instance. The setting of this variable is optional on 32-bit instances of DB2 on Linux and UNIX.
export EXTSHM=ON db2set DB2ENVLIST=EXTSHM db2stop db2start
mqsistop broker export EXTSHM=ON (in the profile of all broker environments) mqsistart broker
The toc (Thread of Control) specified in the XAOpenString determines the mode in which the Resource Manager (DB2) runs. The ThreadOfControl stanza specifies the mode in which the Transaction Manager (WebSphere MQ) runs. Specify explicit values to ensure that both products run in THREAD mode.
If you want to use DB2 in coordinated transactions:
Refer to the information provided for the version of WebSphere MQ that you have installed:
The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on Linux and UNIX systems, and the equivalent information for Windows.
On Linux and UNIX (AIX, HP-UX, and Solaris):
XAResourceManager: Name=DB2 SwitchFile=install_dir/sample/xatm/db2swit XAOpenString=db=MyDataSource,uid=MyUserId,pwd=MyPassword,toc=t XACloseString= ThreadOfControl=THREAD
SwitchFile: C:\Program Files\IBM\MQSI\6.0\sample\xatm\db2swit.dll XAOpenString: db=MyDataSource,uid=MyUserId,pwd=MyPassword,toc=t ThreadOfControl: THREAD
The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on Linux and UNIX systems, and the equivalent information for Windows.
On Linux and UNIX (AIX, HP-UX, and Solaris):
ln –s install_dir/sample/xatm/db2swit /var/mqm/exits/db2swit ln –s install_dir/sample/xatm/db2swit64 /var/mqm/exits64/db2swit
XAResourceManager: Name=DB2 SwitchFile=db2swit XAOpenString=db=MyDataSource,uid=MyUserId,pwd=MyPassword,toc=t XACloseString= ThreadOfControl=THREAD
On Windows, set the following values on the Resources page of the properties dialog box for your WebSphere MQ queue manager. This example assumes that you have installed WebSphere Message Broker in the directory C:\WMQI:
SwitchFile: C:\wmqi\sample\xatm\db2swit XAOpenString: db=MyDatabase,uid=MyUserId,pwd=MyPassword,toc=t ThreadOfControl: THREAD
If you want to use DB2 in coordinated transactions:
The following examples show what you must include in the XAResourceManager stanza in the qm.ini file on UNIX systems.
ln –s install_dir/sample/xatm/db2swit64 /var/mqm/exits64/db2swit
XAResourceManager: Name=DB2 SwitchFile=db2swit XAOpenString=db=MyDataSource,uid=MyUserId,pwd=MyPassword,toc=t XACloseString= ThreadOfControl=THREAD
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac00900_ |