Mimer JTRACE Driver 1.0 Guide (Beta-test)

Introduction

The Mimer JTRACE Driver is a JDBC driver that sits "on top" of another JDBC driver. All calls made to the JTRACE driver are passed on to the other driver. The JTRACE driver produces a trace of all JDBC calls that were made, as well as timing information. The JTRACE driver can be used with any JDBC 1.2 driver and is not limited to Mimer JDBC drivers.

How to set up the Mimer JTRACE Driver

Loading the driver

To be able to use the Mimer JTRACE Driver it must be loaded into the Java environment. To achieve this, a program loads a driver explicitly by calling the Class.forName method with the driver class as the parameter. The name of the Mimer driver class is com.mimer.jtrace1.driver. The driver is then located by the Java environment with a search along the class path, defined in the CLASSPATH environment variable.

Note that you must also load the traced driver. An application that uses JTRACE would normally need to load two JDBC drivers.

URL Syntax

The syntax of a connection URL is (items contained in square brackets are optional)

  jdbc:jtrace:[?trace-options]url

...where the trace-options syntax is as follows:

  [window&][logfile=filename&][dm&]

...and url is the URL of the traced driver.

The following trace-options are known to the trace driver:

Example

The following URL:

jdbc:jtrace?logfile=C:\Temp\logf.txt&jdbc:mimer://myhost/mydb

...will trace the URL jdbc:mimer://myhost/mydb. The output will be written to the file C:\Temp\logf.txt, and may look like this:


12:31:25.700 drv1.connect("jdbc:jtrace:?logfile=c:\Temp\logf.txt&jdbc:mimer://myhost/mydb", {password=SYSADM, user=SYSADM})
       0.980 con1
12:31:26.680 con1.createStatement()
       0.170 s1
12:31:27.070 s1.executeQuery("select * from mimer.databanks")
       0.930 rs1
12:31:28.110 rs1.next()
       6.260 true
12:31:34.430 rs1.getString(1)
       0.050 "SYSTEM            "
12:31:34.480 rs1.getString(2)
       0.390 "SYSDB             "
12:31:34.870 rs1.getString(3)
       0.000 "L"
12:31:35.030 rs1.getString(4)
       0.000 "SYSDB             "
12:31:35.090 rs1.next()
       0.000 true
12:31:35.140 rs1.getString(1)
       0.000 "SYSTEM            "
12:31:35.140 rs1.getString(2)
       0.060 "TRANSDB           "
12:31:35.200 rs1.getString(3)
       0.000 "T"
12:31:35.250 rs1.getString(4)
       0.000 "TRANSDB           "
12:31:37.340 rs1.next()
       0.110 false
12:31:37.450 rs1.close()
       0.000
12:31:37.450 s1.close()
       0.000	
12:31:37.500 con1.close()
       0.110