JDBC Type 2 Driver 3.0 Programmer's Reference (SQL/MX 3.x)

name is mapped to a trace data source object by means of a naming service that uses the Java Naming and Directory
Interface (JNDI).
The following table describes the set of properties that are required for a trace data source object:
Property Name Type Description
dataSourceName String
The data source name
description String
Description of this data source
traceDataSource String
The name of the DataSource object to be
traced
The traceDataSource object is used to obtain the JDBC connection to the database. Java applications should turn on
tracing using the setLogWriter method of the DataSource interface.
Tracing Using the java Command
Enable tracing by specifying the tracing system property by using the following arguments when starting your Java
program:
java -Djdbcmx.traceFile=logFile -Djdbcmx.traceFlag=n
The logFile is the file name that is to contain the tracing information. The n value for the traceFlag can be the
following values:
Value for
n
Description
0 No tracing.
1
Traces connection and statement pooling
calls only.
2 Traces the LOB-code path only.
3 Traces the entry point of all JDBC methods.
Note: Only one
traceFlag value can be in effect at a time.
Tracing Using the system.setProperty Method
Enable tracing by using the System.setProperty(key, value) to set the same value as described above. For
example:
System.setProperty("traceFile", "myLogFile.log");
System.setProperty("traceFlag", "2");