Multiple database configurations
If you want to configure the queue manager so that updates to multiple databases can be included within global units of work, add an XAResourceManager stanza for each database.
If the databases are all managed by the same database manager, each stanza defines a separate database. Each stanza specifies the same SwitchFile, but the contents of the XAOpenString are different because it specifies the name of the database being updated. For example, the stanzas shown in Figure 1 configure the queue manager with the Db2® databases MQBankDB and MQFeeDB on UNIX and Linux systems.Important: You cannot have multiple stanzas pointing to the same database. This configuration does not work under any circumstances, and if you try this configuration it fails.You will receive errors of the form when the MQ code makes its second xa_open call in any process in this environment, the database software fails the second xa_open with a -5 error, XAER_INVAL.
XAResourceManager: Name=DB2 MQBankDB SwitchFile=db2swit XAOpenString=MQBankDB XAResourceManager: Name=DB2 MQFeeDB SwitchFile=db2swit XAOpenString=MQFeeDB
XAResourceManager: Name=DB2 MQBankDB SwitchFile=db2swit XAOpenString=MQBankDB XAResourceManager: Name=Oracle MQFeeDB SwitchFile=oraswit XAOpenString=Oracle_XA+Acc=P/myuser/mypassword+SesTm=35+LogDir=/tmp/ora.log+DB=MQFeeDB
In principle, there is no limit to the number of database instances that can be configured with a single queue manager.
Note: For information on support for including Informix® databases in multiple database updates within global units of work, check the product readme file.