Product: | JDBC DBConnectivity Products for IBM Db2 (HiT JDBC/400, HiT JDBC/DB2) |
Version: | All |
ID: | 1171 |
Summary: | Steps to generate a JDBC trace file |
When reporting a problem for support, generate and attach a trace file that shows the problem so that we can quickly analyse the issue. There are two ways for generating a trace file:
- Insert the following line before calling DriverManager.getConnection()
DriverManager.setLogStream(newPrintStream(newFileOutputStream("jdbc_trace.txt")));
where "jdbc_trace.txt" is the name of the output file (please feel free to use your own)
or
- Use the connection option "trace_file" to specify the output file, for example:
url = "jdbc:as400://mydb;libraries=mylib;trace_file=jdbc_trace.txt";
or
url = jdbc:db2://mydb;50000;rdbname=sample;trace_file=jdbc_trace.txt