Log the SQL StatementsTag(s): JDBC
Plain JDBC LoggingSee this HowTo.
P6SpyP6Spy 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 stringP6Spy is especially useful with an application server.
Download at http://p6spy.com/
It is a bit old, the latest release is 2003!
ProxoolProxool is a Java connection pool.
It provides really nice logging facilities with the SQL statement and the running time.
Download at http://proxool.sourceforge.net/
JDBC LoggerJDBC 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 http://jdbclogger.sourceforge.net/
Log4JDBCLog4jdbc is a Java JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information) for other JDBC drivers
Download at http://code.google.com/p/log4jdbc/