Solved

Tracing a third party JDBCODBC application

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoreUp challenge 14 48
topping1 challenge 7 50
eclipse formatting 6 40
GUI builder for Eclipse? 8 8
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now