This week's book giveaway is in the Agile and Other Processes forum.We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!See this thread for details.

monitoring JDBC

hi, is there any way to monitor the JDBC-datastream between a db-server and a java-client? i'm using jconnect5.5 to connect to a sybase-db. does anybody know a good moitoring-tool? regards christoph

Loren Rosen

Ranch Hand

Posts: 156

posted 13 years ago

Do you really want to look at the protocol between the JDBC driver and the server, or do really want to know what queries are being sent? To log the queries, log4j has a logging facility, which has some limitations. Various people have tried to fix these, e.g. see here and here ... a google search for 'jdbc log4j' might find even more. There's also this article from IBM developer works. If you're using some O/R mapping tool, or an app server, it may have facilities for doing the logging. Also, your database server can probably be set-up to log queries. As for lower-level protocol logging, most JDBC drivers interact with the server in the same way as any other client. The tools to look at the interaction are specific to the DBMS.