How to collect jcc trace in WebSphere to troubleshoot SQL
November 29, 2009 – 10:37 pmIn WebSphere (should be similar in other app server), follow listed steps to enable jcc tracing:
1. Select the data source that uses the Universal Driver from the WebSphere administrative console.
2. Click Custom Properties on the data source configuration screen.
3. Enter value -1 (TRACE_ALL) for the traceLevel property. This is recommended for most problem determination because it generates the maximum amount of trace data. If only specific trace data is needed, it is possible to enable only certain types of tracing.
Here are the values to enter for the “traceLevel” (spelled exactly) property, based on the type of trace data that is needed:
Trace Level Desired traceLevel Property
TRACE_NONE 0
TRACE_CONNECTION_CALLS 1
TRACE_STATEMENT_CALLS 2
TRACE_RESULT_SET_CALLS 4
TRACE_DRIVER_CONFIGURATION 16
TRACE_CONNECTS 32
TRACE_DRDA_FLOWS 64
TRACE_RESULT_SET_META_DATA 128
TRACE_PARAMETER_META_DATA 256
TRACE_DIAGNOSTICS 512
TRACE_SQLJ 1024
TRACE_ALL -1
4. Enter a fully-qualified directory and file name for the trace output for the traceFile property; for example, C:\DB2\jcctrace.log
5. Save the configuration. There is no need to restart the Application Server. The tracing begins the next time the data source is used.
6.
The resulting trace file can be analyzed to determine the cause of the problem after reproducing the problem (e.g, SQL statements are logged along with their execution response times).
.pw.
You must be logged in to post a comment.