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.
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 https://stackoverflow.com/search?q=p6spy for questions about p6spy.
http://www.p6spy.com/
精彩评论