JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)
To enable logging, use the enableLog property. For more information, see “Logging SQL Statement
IDs and Corresponding JDBC SQL Statements” (page 77).
Statement-ID Log Output
The format of a statement-ID log output entry is:
[timestamp] STMTobject-id (sql-statement)
where
timestamp
is the day and time representation in the form: mm/dd/yy hr:min:sec
where mm is month; dd , day; yy , year; hr , hour; min , minute; sec , seconds.
object-id
is the hashcode of the JDBC object.
sql-statement
is the actual SQL statement mapped to the statement ID.
Example
[08/05/05 10:32:38] STMT16399041 ("insert into TST_TBL (c1) values = ?")
JDBC Trace Facility Demonstration Program
The JDBC/MX driver provides jdbcTrace demonstration programs in the installation directory. The
programs are described in the README_JDBCTrace file. For the location, see “JDBC/MX Driver
File Locations” (page 18). These programs demonstrate tracing by creating a wrapper around the
driver-specific data source to be traced. For additional information, see “Sample Programs Summary”
(page 16).
Tracing limitation
Problem
The JDBC/MX T2 driver issues an exception, java.lang.IllegalAccessError when both
sqlmx.jar (JDBC Type 2 driver for SQL/MP) and jdbcMx.jar (JDBC Type 2 driver for SQL/MX)
are included in the CLASSPATH, and sqlmp.jar precedes jdbcMx.jar in the CLASSPATH.
For example,
CLASSPATH=.:/usr/tandem/jdbcMp/T1277H10/lib/sqlmp.jar:/usr/tandem/jdbcMx/T1275H50/lib/jdbcMx.jar
Cause
This issue occurs because the same package and class,
com.tandem.jdbc.TPreparedStatement are available in both sqlmx.jar (JDBC Type 2
driver for SQL/MP) and jdbcMx.jar (JDBC Type 2 driver for SQL/MX).
Solution
To resolve this error, ensure jdbcMx.jar precedes sqlmp.jar in the CLASSPATH. For example,
CLASSPATH=.:/usr/tandem/jdbcMx/T1275H50/lib/jdbcMx.jar :/usr/tandem/jdbcMp/T1277H10/lib/sqlmp.jar
JDBC Trace Facility Demonstration Program 79










