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.
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:
To enable JDBC 2.0 complete the following:
SQLLIB\java12\usejdbc2.cmd
Perform the steps once for each system.
To see whether the JDBC level in use on your system:
SQLLIB\java12\inuse
SQLLIB\java11\inuseor there will be no java11 directory
Before starting WebSphere Application Server to host applications requiring data access, source the db2profile:
.~db2inst1/sqllib/db2profilewhere db2inst1 is the user created during DB2 installation.
Instructions are available for using JTA drivers on particular operating systems. See your operating system's documentation for more information.
To enable JTA drivers for DB2, follow these steps:
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).
%DB2_ROOT%/Sqllib/java/db2java.zipCOM.ibm.db2.jdbc.DB2XADataSourceDo 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
sljc.jar file, which
contains all classes of the SequeLink JDBC driver that implement the JDBC 2.0 core APIsljcx.jar file, which contains all the classes of the SequeLink JDBC driver that implement
the JDBC 2.0 Optional Package.
Use the method setBigDecimal instead of setLong. SequeLink maps the data type NUMBER of SQLServer to the JDBC data type NUMERIC.
According to the JDBC specification, the Java type java.math.BigDecimal is the recommended mapping for JDBC data type NUMERIC. Therefore, use the setBigDecimal or getBigDecimal methods respectively to bind or retrieve the NUMERIC data type of Microsoft SQL Server.
Check the Merant Web site for updates to this information.
Here are some common problems and possible solutions.
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: