Solved

Tracing a third party JDBCODBC application

Posted on 2007-11-27
3
296 Views
Last Modified: 2013-12-29
I have a third party application that uses JDBC to connect to and query a database.  The performance of this application is quite poor and I would like to produce a trace of the calls that the application is making in to the JDBC driver - I have found a number of places that talk about how to enable logging of the JDBCODBC driver when you are codinging the program that is using the driver, but none on how to invoke tracing when you don't have control over the source code.    The examples I have found all involve calling java.sql.DriverManager.setLogStream(java.lang.System.out);

I have tried using P6Spy's JDBC driver, but this only logs SQLStatements executed by the application, and I would like to log all JDBC calls (the application I want to trace makes heavy use of the metadata functions within the JDBC API).

I am really hoping there's a way to invoke the trace functionality either through parameters passed in on the database connection URL or through environment variables.

Thanks for any help,
-jdc
0
Comment
Question by:clajo04
3 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 200 total points
ID: 20361342
you can't sorry.
0
 

Author Comment

by:clajo04
ID: 20362363
Okay - not the answer I was hoping for, but very possibly accurate...

If no one can provide a solution in the next couple of days, I will award points to you.

thanks,
-clajo04
0
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 300 total points
ID: 20364960

Take a look at log4jdbc. Quote: "log4jdbc is a JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information) for other JDBC drivers..

http://log4jdbc.sourceforge.net/

And also some other tools, but I belive log4jdbc is the one you need:

http://sourceforge.net/projects/jdbcproxy
http://developer.mimer.se/print_result.tml?typ=2&id=28
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question