JDBC Driver for SQL/MX Programmer's Reference
jdbc:sqlmx:
Java applications should turn on tracing using the DriverManager.setLogWriter
method, for example by using the following JDBC API call in your application:
DriverManager.setLogWriter(new PrintWriter(new
FileWriter("FileName")));
Tracing Using the DataSource
Implementation
This is preferred way to establish a JDBC connection and to enable the JDBC trace facility. In
this way, a logical 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
This method applies only to JDBC Driver for SQL/MX.
Enable tracing by specifying the tracing system property by using the following arguments
when starting your Java program:
java -DtraceFile=logFile -DtraceFlag=n