Professional Documents
Culture Documents
To Bottom
In this Document
Goal
Solution
Managing log files
References
APPLIES TO:
JDBC - Version 10.1.0 to 12.1.0.1.0
Information in this document applies to any platform.
GOAL
The purpose of this document is to illustrate the JDBC 10g/11g tracing feature. This is also
referred as JDBC logging.
JDBC logging is now documented in the JDBC Developer's guide:
Oracle Database JDBC Developer's Guide,
11g Release 2 (11.2)
Part Number E16548-02
31 Diagnosability in JDBC
Logging
Oracle Database JDBC Developer's Guide
12c Release 1 (12.1)
E49300-05
32 Diagnosability in JDBC
Logging
Prior to JDBC 10g, the JDBC 9i driver used a different method for logging. Starting with 10gR1
and as of current versions, the JDBC driver relies on the standard java.util.loggingframework
provided with JDK 1.4 and higher.
SOLUTION
The JDBC driver tracing facility utilizes package java.util.logging. There are two ways to initiate
JDBC tracing:
java.util.logging API
This document introduces the tracing loggers and levels then describes two approaches to
implement tracing.
Tracing Loggers
The user has fine grained control over the tracing by setting specific loggers. The tracing loggers
are:
oracle.jdbc
oracle.jdbc.driver
oracle.jdbc.datum
oracle.jdbc.adt
oracle.jdbc.conversion
oracle.jdbc.thin
oracle.jdbc.kprb
oracle.jdbc.pool
oracle.jdbc.xa
oracle.jdbc.sqlj
oracle.jdbc.oci
oracle.jdbc.jpub
Tracing Levels
For every logger there are different levels one can set. Depending on the information required
one can specify general level with less output or very detailed output. The tracing levels can have
the following values:
INFO
o JDBC API level tracing
o expected volume: low
SEVERE
o
WARNING
o Error conditions that are usually recoverable
o expected volume: low
FINE
o Function entry/return information
o expected volume: medium
FINER
o High-level debug information
o expected volume: medium
FINEST
o Detail debug information
CONFIG
o SQL string
o expected volume: low
oracle.jdbc.level = FINEST