The supported levels of DB2(R) are defined at:
http://www.ibm.com/software/ts/mqseries/platforms/supported.html
Do the following:
Read this information in conjunction with the general information provided in Configuring your system for database coordination.
Ensure that your DB2 environment variables are set for queue manager processes as well as in your application processes. In particular, you must always set the DB2INSTANCE environment variable before you start the queue manager. The DB2INSTANCE environment variable identifies the DB2 instance containing the DB2 databases that are being updated. For example:
export DB2INSTANCE=db2inst1
set DB2INSTANCE=DB2
The easiest way to create the DB2 switch load file is to use the sample file xaswit.mak, which WebSphere MQ provides to build the switch load files for a variety of database products.
On Windows systems, you can find xaswit.mak in the directory C:\Program Files\IBM\WebSphere MQ\tools\c\samples\xatm. To create the DB2 switch load file with Microsoft Visual C++, use:
nmake /f xaswit.mak db2swit.dllThe generated switch file is placed in c:\Program Files\IBM\WebSphere MQ\exits.
On AIX(R), you can find xaswit.mak in the directory /usr/mqm/samp/xatm; on other UNIX systems, you can find it in the directory /opt/mqm/samp/xatm.
Edit xaswit.mak to uncomment the lines appropriate to the version of DB2 you are using. Then execute the makefile using the command:
make -f xaswit.mak db2swit
The generated 32-bit switch load file is placed in /var/mqm/exits.
The generated 64-bit switch load file is placed in /var/mqm/exits64.
The next step is to modify the configuration information for the queue manager, as described in Adding configuration information to the queue manager, to declare DB2 as a participant in global units of work.
Figure 11 is a UNIX sample, showing an XAResourceManager entry where the database to be coordinated is called mydbname, this name being specified in the XAOpenString:
XAResourceManager: Name=mydb2 SwitchFile=db2swit XAOpenString=mydbname,myuser,mypasswd,toc=t ThreadOfControl=THREAD
For each DB2 database that the queue manager is coordinating, you need to:
If you have not specified a user name and password on the xa_open string, the user under which the queue manager is running is used by DB2 to authenticate the xa_open call. If this user (for example, user mqm on UNIX systems) does not have minimal privileges in the database, the database refuses to authenticate the xa_open call.
The same considerations apply to your application process. If you have not specified a user name and password on the xa_open string, the user under which your application is running is used by DB2 to authenticate the xa_open call that is made during the first MQBEGIN. Again, this user must have minimal privileges in the database for this to work.
For example, give the mqm user connect authority in the mydbname database by issuing the following DB2 commands:
db2 connect to mydbname db2 grant connect on database to user mqmSee Security considerations for more information about security.
Use the command db2 update dbm cfg using TP_MON_NAME mqmax to name MQMAX.DLL as the library that DB2 uses to call the queue manager. This must be present in a directory within PATH.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
db2cfg |