There are two ways to generate a trace file for HiT JDBC/400 or HiT JDBC/DB2:
- 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.
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";
url = "jdbc:db2://mydb;50000;rdbname=sample;trace_file=jdbc_trace.txt"