Microsoft provided us a way to create our own profiler by using Microsft.* namespaces. I can trace all queries going to any MS SQL instance. I need to do this on MySQL as well. Is there any api available for .net or java to do this? If anyone can provide also a working code is very much appreciated thanks alot.
A:
Traditionally p6spy has been used for wrapping a JDBC-connection in Java to help analyze and debug said connection, for instance printing out all SQL going to the database. See http://stackoverflow.com/search?q=p6spy for questions about p6spy.
Thorbjørn Ravn Andersen
2010-07-08 02:47:08
I needed something I can embed in my application.
powerbox
2010-07-08 03:09:12
p6spy is a JDBC-driverwrapper you embed in your own application, and wrap another JDBC-driver with (previously used in your application).
Thorbjørn Ravn Andersen
2010-07-08 08:42:12