Solved

Tracing a third party JDBCODBC application

Posted on 2007-11-27
3
313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

630 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