JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)

Enabling Tracing for Application Servers
Typically, tracing output is written to the PrintWriter object that the application sets by using
either the DataSource.setLogWriter() method or DriverManager.setLogWriter()
method. User-written Java applications can use these methods with the JDBC Trace Facility.
Application servers, however, might not enable the JDBC tracing with the setLogWriter()
method. Instead application servers can enable tracing and set the tracing level by using the
following JDBC/MX properties:
“jdbcmx.traceFile Property” (page 76)
“jdbcmx.traceFlag Property” (page 76)
jdbcmx.traceFile Property
To enable tracing for application servers, use the jdbcmx.traceFile property specified in the
command line:
-Djdbcmx.traceFile=trace_file_name
where jdbcmx.trace_file_name is an OSS filename. If the file exists, the
tracing output is appended to the existing file.
The PrintWriter object that is set using setLogWriter() method has higher
precedence over the jdbcmx.traceFile system property setting. This property
can be specified in the command line or programmatically before the first
connection.
jdbcmx.traceFlag Property
To set the tracing level for application servers that use the jdbcmx.traceFile property, use the
traceFlag property specified in the command line:
-Djdbcmx.traceFlag=n
where n is an integer that specifies the tracing level. The value can be 0, 1, or 2.
The default level is 0. Any value greater than 2 is treated like 2. The tracing levels
are:
MeaningLevel
No tracing.0
Traces connection and statement pooling calls only.1
Traces the LOB-code path only.2
Traces the entry point of all JDBC methods.3
NOTE: Only one traceFlag value can be in effect at a time.
Trace-File Output Format
A trace entry appears at the start of the trace file that shows the vproc of the JDBC/MX driver being
traced. This entry appears only when the traceFlag value is 1, 2, or 3. For example,
jdbcTrace:[05/02/12 01:05:24]:TRACING JDBC/MX VERSION: T1275R32_30AUG2012_JDBCMX_1209
The format of the trace output has two types where the second type is used only where the JDBC/MX
driver has an object to map to. The formats are:
Format 1
jdbcTrace:[timestamp] [thread-id]:[object-id] :className.method(param...)
Format 2
76 JDBC Trace Facility