If you are using Type 4 driver with Weblogic, there is very handy utility for tracking the JDBC calls issued by an application and then passes the calls to the wrapped WebLogic Type 4 JDBC driver. We can use the information in the logs to help troubleshoot problems in the application.
To use WebLogic JDBC Spy with WebLogic Server, you add JDBC Spy attributes to the end of the URL in the JDBC data source configuration.
1. Before start make sure WL_HOME/server/lib/wlspy.jar should be in the classpath
2. Open the Admin console, connection pool setting, append the the below spy attributes to the DB URL.
;spyAttributes=(log=(file)d:\spy.log;timestamp=yes) In case if you want to redirect the calls to log file
;spyAttributes=(log=System.out;timestamp=yes) In case if you want to see the logs in console.
3. Start the data source and see the output in the logs.
Really HATS OFF to weblogic team for this superb work. Vey handy.
For full detials[http://download.oracle.com/docs/cd/E11035_01/wls100/jdbc_drivers/spy.html]