The Derby Network client provides a tracing facility to collect JDBC trace information and view protocol flows.
ij>connect 'jdbc:derby://localhost:1527/mydb; create=true;traceFile=trace.out;user=user1;password=secret4me';
String url = "jdbc:derby://samplehost.sampledomain.com:1528/mydb" + ";traceFile=/u/user1/trace.out" + ";traceLevel=" + org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS; DriverManager.getConnection(url,"user1","secret4me");
Trace level | Value |
---|---|
org.apache.derby.jdbc.ClientDataSource.TRACE_NONE | 0x0 |
org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTION_CALLS | 0x1 |
org.apache.derby.jdbc.ClientDataSource.TRACE_STATEMENT_CALLS | 0x2 |
org.apache.derby.jdbc.ClientDataSource.TRACE_RESULT_SET_CALLS | 0x4 |
org.apache.derby.jdbc.ClientDataSource.TRACE _DRIVER_CONFIGURATION | 0x10 |
org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTS | 0x20 |
org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS | 0x40 |
org.apache.derby.jdbc.ClientDataSource.TRACE _RESULT_SET_META_DATA | 0x80 |
org.apache.derby.jdbc.ClientDataSource.TRACE _PARAMETER_META_DATA | 0x100 |
org.apache.derby.jdbc.ClientDataSource.TRACE_DIAGNOSTICS | 0x200 |
org.apache.derby.jdbc.ClientDataSource.TRACE_XA_CALLS | 0x800 |
org.apache.derby.jdbc.ClientDataSource.TRACE_ALL | 0xFFFFFFFF; |
TRACE_PROTOCOL_FLOWS | TRACE_CONNECTION_CALLS
~TRACE_PROTOCOL_FLOWS