can I see all SQL statements sent over an ODBC connection?

Posted by Dave Cameron on Stack Overflow See other posts from Stack Overflow or by Dave Cameron
Published on 2010-04-20T01:59:11Z Indexed on 2010/04/20 2:03 UTC
Read the original article Hit count: 337

Filed under:
|
|
|
|

I'm working with a third-party application that uses ODBC to connect to, and alter, a database. During certain failure modes, the end-results are not what I expect. To understand it better, I'd like some way of inspecting all the statements sent to the database. Is there a way to do this with ODBC?

I know with JDBC I could use http://www.p6spy.com/ to see all statements sent, for example when debugging hibernate. p6spy is a "proxy" driver that records commands sent and forwards them on to the real JDBC driver.

Another possibility might be a protocol sniffer that would capture statements over the wire. Although, I'm unsure if ODBC includes a standard wire protocol, or only specifieds the API.

Does anyone know of existing tools that would allow me to do either of these things? Alternatively, is there another approach I could take?

© Stack Overflow or respective owner

Related posts about sql

Related posts about proxy