JDBC Spy utility in Weblogic to track JDBC calls issued by an application


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.

e.g   jdbc:oracle:thin:@;spyAttributes=(log=System.out;timestamp=yes)

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]

R Vashi

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.