Chapter 15. Problem Diagnosis With The Ibm Data Server Driver For Jdbc And Sqlj - IBM DB2 Manual

Table of Contents

Advertisement

Chapter 15. Problem diagnosis with the IBM Data Server
Driver for JDBC and SQLJ
|
|
|
|
|
|
|
|
|
|
|
© Copyright IBM Corp. 1998, 2008
To obtain data for diagnosing SQLJ or JDBC problems with the IBM Data Server
Driver for JDBC and SQLJ, collect trace data and run utilities that format the trace
data.
You should run the trace and diagnostic utilities only under the direction of IBM
software support.
Collecting JDBC trace data
Use one of the following procedures to start the trace:
Procedure 1: For IBM Data Server Driver for JDBC and SQLJ type 2 connectivity, the
recommended method is to start the trace by setting the db2.jcc.override.traceFile
property and the db2.jcc.t2zosTraceFile property in the IBM Data Server Driver for
JDBC and SQLJ configuration properties file.
You can set the db2.jcc.tracePolling and db2.jcc.tracePollingInterval properties
before you start the driver to allow you to change global configuration trace
properties while the driver is running.
Procedure 2: For IBM Data Server Driver for JDBC and SQLJ type 4 connectivity, the
recommended method is to start the trace by setting the db2.jcc.override.traceFile
property or the db2.jcc.override.traceDirectory property in the IBM Data Server
Driver for JDBC and SQLJ configuration properties file. You can set the
db2.jcc.tracePolling and db2.jcc.tracePollingInterval properties before you start the
driver to allow you to change global configuration trace properties while the driver
is running.
Procedure 3:
1. If you use the DataSource interface to connect to a data source, invoke the
DB2BaseDataSource.setTraceLevel method to set the type of tracing that you
need. The default trace level is TRACE_ALL. See "Properties for the IBM Data
Server Driver for JDBC and SQLJ" for information on how to specify more than
one type of tracing.
2. Invoke the DB2BaseDataSource.setJccLogWriter method to specify the trace
destination and turn the trace on.
Procedure 4:
If you use the DataSource interface to connect to a data source, invoke the
javax.sql.DataSource.setLogWriter method to turn the trace on. With this
method, TRACE_ALL is the only available trace level.
If you use the DriverManager interface to connect to a data source, follow this
procedure to start the trace.
1. Invoke the DriverManager.getConnection method with the traceLevel property
set in the info parameter or url parameter for the type of tracing that you need.
483

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents