For access to relational databases, applications use the JDBC drivers
and data sources that you configure for the application server.
Before you begin
Each vendor database requires different JDBC driver implementation
classes for JDBC connectivity. A JDBC provider encapsulates those vendor-specific
driver files. Through the data source that you associate with the JDBC provider,
an application server obtains and manages the physical connections for transactions
between applications and the database.
Determine the version of data source
that you need according to the API specification of your applications.
- Data sources (WebSphere Application Server Version
4) are for use with the Enterprise JavaBeans (EJB) 1.0 specification and
the Java Servlet 2.2 specification.
- Data sources of the latest standard version are for use with applications
that implement the more advanced releases of these specifications.
Important: If you
connect to DB2 for z/OS through the JDBC Universal JDBC Driver, follow the
steps that are outlined in
Using the DB2 Universal JDBC Driver to access DB2 for z/OS. This
article gives detailed instruction on installing the JDBC driver and related
files, plus activating required JDBC properties.
Results
If you use the DB2 JDBC Universal Driver, you might experience data
source failures that the application server JVM log does not document. Check
the DB2 database log or the WebSphere Application Server JDBC trace log (if
JDBC trace was active). You might find that a bad authentication credential
is the cause of failure. Currently the DB2 JDBC Universal Driver does not
identify or surface the errors that are produced by non-valid authentication
credentials in a proper or consistent way.
Even if you receive information
about a bad credential, check the database and JDBC trace logs. These logs
provide more reliable, detailed error data on authentication failures.
Tip: The JDBC trace log exists only if the JDBC trace service is active
during server start up. Activate the service in the administrative console.
For more information, see
Enabling trace at server startup. Specify
WAS.database as
the trace group and select
com.ibm.ws.db2.logwriter as the trace string.