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 16 configure the queue manager with the DB2(R) databases MQBankDB and MQFeeDB on UNIX(R) systems.

Figure 16. Sample XAResourceManager entries for multiple DB2 databases
XAResourceManager:
  Name=DB2 MQBankDB
  SwitchFile=db2swit
  XAOpenString=MQBankDB
 
XAResourceManager:
  Name=DB2 MQFeeDB
  SwitchFile=db2swit
  XAOpenString=MQFeeDB

If the databases to be updated are managed by different database managers, add an XAResourceManager stanza for each. In this case, each stanza specifies a different SwitchFile. For example, if MQFeeDB is managed by Oracle instead of DB2, use the following stanzas on UNIX systems:

Figure 17. Sample XAResourceManager entries for a DB2 and Oracle database
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(R) databases in multiple database updates within global units of work, check the product readme file.