Each database is defined as a separate resource manager (RM) to the transaction manager (TM), and the database must be identified with an XA open string that has the following syntax:
"database_alias<,username,password>"
The database_alias is required to specify the database alias name of the database. This alias name is the same as the database name unless you have explicitly cataloged an alias name after you created the database. The username and password are optional, and are used to provide authentication information to the database if the database manager instance is set up with the authentication database manager configuration parameter set to SERVER.
When setting up a database as a resource manager, you do not require the XA close string. This string will be ignored by the database manager if it is provided.
A program can access different databases using the SQL CONNECT statement. Each transaction can access one or more databases as described in Chapter 7. "Distributed Databases". Every database to be accessed in the transaction must be defined as a resource manager using an XA open string. If a database is not defined as a resource manager, that database cannot be used within a transaction controlled by an XA-compliant transaction manager.
The database manager allows both non-XA and global transactions to access local and remote instances of the database manager. If all the databases reside on machines separated from the TP Monitor machine, the TP Monitor machine uses the database client to forward the XA and SQL requests to the databases.
The database manager also supports access from global transactions to databases that implement the Distributed Relational Database Architecture (DRDA) to ensure data integrity with other RMs accessed by the same transaction. See the Embedded SQL Programming Guide for information about the SQL statements that are allowed in this environment.
The access to DRDA databases is dependent on the type of application server:
A two-phase commit transaction can only read a database on a DRDA1 application server.
If read/write accesses are required against DRDA1 databases, the transactions must be run as non-XA transactions. For example, in a CICS for AIX environment, this will require running the transaction from a CICS region that does not define any DB2 for AIX databases in its XAD definition. The SQL COMMIT or ROLLBACK statement has to be explicitly coded in a non-XA application.
Two-phase commit is possible with DRDA2 Application Servers provided the DRDA Server is accessed using SNA and using the DB2 Connect Enterprise Edition LU 6.2 Sync Point Manager (SPM). Access to DB2 Connect/SPM can be either local or as a gateway on a remote machine.
If the SPM is not available, or if the DRDA Server does not support the LU 6.2 syncpoint function, or the DRDA Server is accessed using TCP/IP, then the connection will be read-only, similar to accessing a DRDA1 database.
Please see DB2 Connect Enterprise Edition Quick Beginnings for information regarding the use of the SPM.