where db2inst1 is the user created during DB2 installation.
Performing platform-specific tasks for JDBC access
This article provides miscellaneous tips for using supported databases. See also the related links.
Before you begin
Most of the following tasks are performed outside of the WAS administrative tools, using the database product tools. Always refer to the documentation that accompanies your database JDBC driver as the authoritative and complete source of driver information. The Supported hardware and software web page lists drivers that are supported by Application Server for specific platforms.
Procedure
Enable Java Transaction API (JTA) drivers for DB2 on Windows NT systems by following these steps:
- Bind the necessary packages to the database. From the DB2 Command Line Processor window, issue the following commands:
where mydb2jta is the name of the database to enable for the JTA, and db2home is the DB2 root installation directory path (for example, D:\ProgramFiles\SQLLIB\bnd\@db2cli.lst).db2=> connect to mydb2jta db2=> bind db2home\bnd\@db2cli.lst db2=> bind db2home\bnd\@db2ubind.lst db2=> disconnect mydb2jta- Specify the following settings when you use an IBM WAS administrative client (such as the administrative console) to configure a JDBC driver:
- Server class path = %DB2_ROOT%/Sqllib/java/db2java.zip
- Implementation class name = COM.ibm.db2.jdbc.DB2XADataSource
Enable JTA drivers on supported UNIX systems by following these steps:
- Stop all DB2 services.
- Stop the IBM WAS administrative service.
- Stop any other processes that use the db2java.zip file.
- Make sure that you already enabled JDBC 2.0.
- Start the DB2 services.
- Bind the necessary packages to the database. From the DB2 command-line process or window, issue the following commands:
db2=> connect to mydb2jta db2=> bind db2home\bnd\@db2cli.lst db2=> bind db2home\bnd\@db2ubind.lst db2=> disconnect mydb2jta- Specify the following settings when you use an IBM WAS administrative client (such as the administrative console) to configure a JDBC driver:
- Server class path = $INSTHOME/sqllib/java12/db2java.zip
For example, if $INSTHOME is /home/test, the path will be /home/test/sqllib/java12/db2java.zip
- Implementation class name = COM.ibm.db2.jdbc.DB2XADataSource
Enable JTA drivers for Sybase products on AIX systems by following these steps:
- Enable the Data Transaction Manager (DTM) by issuing these commands (one per line) at a command prompt:
isql -Usa -Ppassword -Sservername sp_configure "enable DTM", 1 go- Stop the Sybase Adaptive Server database and start it again.
- Grant the appropriate role authorization to the enterprise bean user at a command prompt:
isql -Usa -Ppassword -Sservername grant role dtm_tm_role to EJB go
- Sybase Java Transaction API drivers on all platforms: Do not use a Sybase Java Transaction API (JTA) connection in an enterprise bean method with an unspecified transaction context. A Sybase JTA connection does not support the local transaction mode. The implication is that use the Sybase JTA connection in a global transaction context.
Enable multiple session clients for local DB2 databases on AIX systems by working around the limit for shared memory segments per process. AIX, by default, does not permit 32-bit applications to attach to more than 11 shared memory segments per process. Of these 11 shared segments, a maximum of 10 can be used for local DB2 connections. To use EXTSHM with DB2 and avoid stale connections when there are large numbers of session clients, do the following:
- In DB2 client environment (that is, the WAS run-time environment in this case)
export EXTSHM=ON- In DB2 UDB Server environment
export EXTSHM=ON db2set DB2ENVLIST=EXTSHM
Source the db2profile script on supported UNIX systems before starting WebSphere Application Server to host data access applications. Run the command
. ~db2inst1/sqllib/db2profile