
Chapter 4. Gathering SQL performance data 105
4.2.6 Enabling Database Monitors in JDBC clients
The JDBC driver shipped with the Developer Kit for Java (commonly known as the native
JDBC driver
) and the IBM Toolbox for Java JDBC driver support a server trace connection
property. Among other options, it includes an option to start a database monitor.
In Example 4-4, the Java code uses a properties object to enable tracing. The example uses
native JDBC and the IBM Toolbox for Java JDBC concurrently.
Example 4-4 Java code using JDBC
// Register both drivers.
try {
Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
Class.forName("com.ibm.as400.access.AS400JDBCDriver ...