How to enable JDBC tracing starting with JDBC version 3.0.x
How to enable JDBC tracing for debugging JDBC related issues from version 3.00.JC1 onwards.
Resolving the problem
From version 3.00.JC1 of IBM® Informix® JDBC Driver onwards, debug drivers are no longer shipped.
Informix JDBC Driver now supports SQLIDEBUG. You no longer need to set values for TRACE, TRACEFILE or PROTOCOLTRACE, PROTOCOLTRACEFILE. You only need to set SQLIDEBUG.
Using a simple java program called simple.java as an example, the following steps show how to create a trace with the Informix JDBC Driver.
1. Set the CLASSPATH to the Informix JDBC Driver package.
2. Compile simple.java
3. Ensure that SQLIDEBUG is set correctly
c:\Infx\Java>grep SQLIDEBUG simple.java
Note: SQLIDEBUG is set in the connection string. It points to where the trace file will be found with a certain format i.e. trace.xxxxxxx
4. Remove or move all other trace files
5. Run java.simple
6. Then locate the trace file
Volume in drive C has no label.
Volume Serial Number is B823-46D8
Directory of c:\Infx\Java
04/04/2006 14:12 20,560 trace1144156355642.0
1 File(s) 20,560 bytes
0 Dir(s) 4,067,995,648 bytes free
7. You will be able to see that a trace file has been created however
you will not be able to read the file.
8. Send the trace file to your local technical support office for analysis.
Note: The code simple.java is found in the attachments
More support for:
Software version: 3.0
Operating system(s): AIX, DYNIX/ptx, HP-UX, IRIX, Linux, Platform Independent, Reliant UNIX, Solaris, Windows
Reference #: 1237681
Modified date: 26 June 2014
Translate this page: