Solved

Tracing a third party JDBCODBC application

Posted on 2007-11-27
3
303 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

710 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