Share this page 

Log the SQL StatementsTag(s): JDBC

Plain JDBC Logging
See this HowTo.
P6Spy is an open source framework for applications that intercept and optionally modify database statements.

The log file format is

current time|execution time|category|statement SQL String|effective SQL string
P6Spy is especially useful with an application server.

Download at

It is a bit old, the latest release is 2003!

Proxool is a Java connection pool.

It provides really nice logging facilities with the SQL statement and the running time.

Download at

JDBC Logger
JDBC Logger is an Open Source Java tool that intercepts and logs all database statements that use JDBC. It is intended for developers to monitor SQL statements generated by EJB, Hibernate or any other database access tool that doesn't display them in clear.

Download at

Log4jdbc is a Java JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information) for other JDBC drivers

Download at

Oracle JDBC
Oracle driver provides some debugging infos. See this HowTo