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
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.