JDBC Driver for SQL/MX Programmer's Reference

Tracing Using a Wrapper Data Source
Enable tracing by creating a wrapper data source around the data source to be traced. The
wrapper data source contains the TraceDataSource property that you can set to the data
source to be traced. For information about demonstration programs that show using this
method, see JDBC Trace Facility Demonstration Programs.
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
jdbcmx.traceFlag
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: