IBM Support

How to enable JDBC tracing starting with JDBC version 3.0.x

Technote (troubleshooting)


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 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


3. Ensure that SQLIDEBUG is set correctly

c:\Infx\Java>grep SQLIDEBUG  

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

c:\Infx\Java>del trace*

5. Run java.simple

c:\Infx\Java>java simple

6. Then locate the trace file

c:\Infx\Java>dir trace*
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 is found in the attachments

Document information

More support for: Informix Tools
Informix JDBC

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: