jdbc tracing 기능을 사용하는 방법을 설명하는 글입니다. 샘플 자바 코드를 첨부하였습니다.
Technote (troubleshooting)
Problem(Abstract)
How to enable JDBC tracing for debugging JDBC related issues from version 3.00.JC1 onwards.
Resolving the problem
INTRODUCTION
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.
STEPS
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.
Example:
1. Set the CLASSPATH to the Informix JDBC Driver package.
c:\Infx\Java>set
CLASSPATH=C:\infx\JDBC3.00JC3\lib\ifxjdbc.jar;C:\infx\JDBC3.00JC3\lib\ifxjdbcx.jar;.
2. Compile simple.java
c:\Infx\Java>javac simple.java
3. Ensure that SQLIDEBUG is set correctly
c:\Infx\Java>grep SQLIDEBUG simple.java
conn=DriverManager.getConnection("jdbc:informix-sqli://irk:1526/sysmaster:INFORMIXSERVER=irk940;USER=informix;
PASSWORD=ximrofni;SQLIDEBUG=C:\\infx\\java\\trace");
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
systables
syscolumns
...
...
oledbordinals
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
c:\Infx\Java>
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
출처 : https://www-01.ibm.com/support/docview.wss?uid=swg21237681
'Informix > informix reference' 카테고리의 다른 글
Informix 무료 버전 14.10.xC2의 제한 사항 완화 (0) | 2019.11.29 |
---|---|
인포믹스에서 문자열을 구분자로 나누기 (0) | 2019.08.02 |
Onbar에서 사용되는 XBSA API 설명 (0) | 2019.05.19 |
Primary/Mirror Chunk 교체하기 (0) | 2019.04.11 |
UNIQUE 제약조건과 UNIQUE 인덱스의 차이 (0) | 2019.02.21 |