17.3 Oracle Tuxedo Configuration
What follows is the description of the process to configure Oracle Tuxedo for accessing the database residing on mainframe with DB2 Connect. There are some differences based on whether Tuxedo is working with a 64-bit instance of DB2 Database or a 32-bit instance of DB2.
-
Set the
DB2INSTANCE
environment variable to reference the instance that contains the databases that you want Tuxedo to use. Set the PATH variable to include the DB2 Connect directories. Confirm the User ID and Password that can connect to the DB2 databases, you could find some example below:export DB2INSTANCE=db2art export DB2DIR=/opt/ibm/db2_connect/V9.1
- Update some database manager configuration parameters accordingly.
Update the tp_mon_name database manager configuration parameter with the value TUXEDO
. This parameter identifies the name of the transaction processing (TP) monitor product being used.Valid value includes
CICS
,MQ
,CB
,SF
,TUXDEO
,TOPEND
,WAS
, blank or some other value.db2 update dbm cfg using tp_mon_name TUXEDO
- Update the spm_name database manager configuration parameter with the hostname of the machine has DB2 Connect installed. This parameter identifies the name of the sync point manager (SPM) instance to the database manager.
Valid value applies to:
- Database server with local and remote clients
- Database server with local clients
- Partitioned database server with local and remote clients
db2 update dbm cfg using spm_name db2host ("db2host" is the hostname of the machine which installs and configures DB2 Connect).
Note:
"db2host" is an alias name. It has a maximum length of eight characters. If your hostname is more than eight characters, define a short name for it in /etc/hosts. For example,10.100.123.45 mydb2hostname.mydomain mydb2
. In this example,mydb2
is an alias of hostname. - Update the max_connections to be greater than max_coordagents to activate the XA Concentrator. DB2 Connect's connection concentrator technology allows DB2 Connect Enterprise Edition servers to provide support to thousands of users simultaneously executing business transactions, while drastically reducing resources required on the S/390 host or AS/400 database servers.
Note:
If the application is accessing data residing on DB2 for z/OS and OS/390(R), DB2 for iSeries, or DB2 for VM&VSE, the DB2 Connect XA concentrator should be required.You can activate the concentrator feature by setting the value of
MAX_CONNECTIONS
to any number greater than the default. The default value forMAX_CONNECTIONS
is equivalent to the value ofMAX_COORDAGENTS
. Because each application will have one logical agent,MAX_CONNECTIONS
actually controls the number of applications that can be connected to the database instance, whileMAX_COORDAGENTS
controls the number of inbound connections that can be active at any time.MAX_CONNECTIONS
will take a numeric range fromMAX_COORDAGENTS
up to 64,000. The default number of logical agents is equal toMAX_COORDAGENTS
.db2 update dbm cfg using max_connections 500 AUTOMATIC db2 update dbm cfg using max_coordagents 200 AUTOMATIC
- Add a definition for DB2 Connect to the Tuxedo resource manager definition file (
$TUXDIR/udataobj/RM
). In the Example(s) that follow, UDB_XA is the locally-defined Tuxedo resource manager name for DB2 Connect, anddb2xa_switch_std
is the DB2-defined name for a structure oftype xa_switch_t
.# DB2 UDB UDB_XA:db2xa_switch_std:-L${DB2DIR}/lib -ldb2
- Build the Tuxedo transaction monitor server (TMS) for DB2:
${TUXDIR}/bin/buildtms -r UDB_XA -o ${TUXDIR}/bin/TMS_UDB
- Write your own application servers which accesses the DB2 database residing on mainframe, and you can follow the Example(s) below. The -r option specifies the resource manager name, the -f option specifies the files that contain the application business logic, the -s option specifies the application service names for this server, and the -o option specifies the output server file name.
${TUXDIR}/bin/buildserver -r UDB_XA -f svcfile.o -s SVC1,SVC2 -o UDBserver
- Set up the Tuxedo configuration file to reference the DB2 server. In the *GROUPS section of the UBBCONFIG file, add an entry similar to:
UDB_GRP LMID=simp GRPNO=3 TMSNAME=TMS_UDB TMSCOUNT=2 OPENINFO="UDB_XA:db=sample,uid=username,pwd=password,tpm=tuxedo"
Where the TMSNAME parameter specifies the transaction monitor server that you built previously, and the OPENINFO parameter specifies the resource manager name. This is followed by the database name, and the DB2 database user ID and password, which are used for authentication.
The application servers that you built previously are referenced in the *SERVERS section of the Tuxedo configuration file.
- Start Tuxedo application.
tmboot -y