6.6.14.5: Additional administrative tasks for specific databases

For your convenience, this article provides instructions for enabling some popular database drivers, and performing other administrative tasks often required in order to provide data access to applications running on WebSphere Application Server. These tasks are performed outside of the WebSphere Application Server administrative tools, often using the database product tools. Always refer to the documentation accompanying your database driver as the authoritative and complete source of driver information.

See the WebSphere Application Server product prerequisites for the latest information about supported databases, drivers, and operating systems.

Enabling JDBC 2.0

Ensure that your operating system environment is set up to enable JDBC 2.0 use. This is required in order to use data sources created through WebSphere Application Server.

The following steps make it possible to find the appropriate JDBC 2.0 driver for use with WebSphere Application Server administration:

Enabling JDBC 2.0 with DB2

To enable JDBC 2.0 complete the following:

  1. Stop the DB2 JDBC Applet Server service.
  2. Run the following command file:
    SQLLIB\java12\usejdbc2.cmd
  3. Stop WebSphere Application Server (if it is running) and start it again.

Perform the steps once for each system.

Determining the level of JDBC in use for DB2

To see whether the JDBC level in use on your system:

Sourcing the db2profile script on UNIX

Before starting WebSphere Application Server to host applications requiring data access, source the db2profile:

.~db2inst1/sqllib/db2profile
where db2inst1 is the user created during DB2 installation.

Using JTA drivers

Instructions are available for using JTA drivers on particular operating systems. See your operating system's documentation for more information.

Using JTA drivers for DB2

To enable JTA drivers for DB2, follow these steps:

  1. Stop all DB2 services.
  2. Stop the IBM WebSphere Application Server administrative service.
  3. Stop any other processes that use the db2java.zip file. (Note: If the JVIEW process is active, you must stop it.)
  4. Make sure that you already enabled JDBC 2.0.
  5. Start the DB2 services.
  6. Configure DB2 to use JTS as the transaction processing (TP) monitor. From the DB2 Control Center, follow these steps:
    1. Right-click the DB2 instance that contains the database that is to be enabled for JTA access.
    2. Click Multisite Update, Configure to start the Smartguide utility.
    3. Click the Use the TP monitor named below radio button.
    4. Select JTS as the TP monitor.
    5. Click Done.
  7. Bind the necessary packages to the database. From the DB2 Command Line Processor window, issue the following commands:

    db2=> connect to mydb2jta
    db2=> bind db2home\bnd\@db2cli.lst
    db2=> bind db2home\bnd\@db2ubind.lst
    db2=> disconnect mydb2jta 

    where mydb2jta is the name of the database that is to be JTA enabled, and db2home is the DB2 root installation directory path (for example, D:\ProgramFiles\SQLLIB\bnd\@db2cli.lst).

  8. When you use an IBM WebSphere Application Server administrative client (such as the WebSphere Administrative Console) to configure a JDBC driver, specify the following settings:

Notes about Sybase JTA drivers

Do not use a Sybase 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 the Sybase JTA connection must be used in a global transaction context.

Merant SequeLink notes

Troubleshooting tips

Here are some common problems and possible solutions.

Error running DB2: ClassNotFoundException: COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
Possible solution: Make sure you set up DB2 to run with JDBC 2.0.
NULLID error when running DB2 with DB2XADataSource
Possible solution: Bind the files on your database
It does not seem as though the right driver code is being used.
When installing a JDBC provider driver using the Application Resource Configuration Tool, you need to select a classpath for the JDBC Driver. Currently, you can select only the directory containing the JDBC driver.

Make sure that the directory containing the driver does not contain conflicting ZIP or JAR files. For example, if you select the typical installation when installing the Oracle database, both the JDBC 1.0 and JDBC 2.0 classes (classes111.zip and classes12.zip) will be added.

Later, when specifying the driver classpath, if you select the directory containing these files, you will not know which will be loaded first in any given instance.

To prevent the problem:

  1. Create another directory and copy the driver code that you want to use into that directory.
  2. Select the new directory when setting up the classpath for the JDBC driver.