JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.1 (H06.23+, J06.12+)
Set the system property before the program makes any JDBC API calls.
Tracing by Loading the Trace Driver Within the
Program
Enable tracing by loading the JDBC trace driver within the program by using the
Class.forName("com.tandem.jdbc.TDriver") method. This method also requires that you set the
DriverManager.setLogWriter method.
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:
-Djdbcmx.traceFlag=n










