Search code examples
sqloracledelphidebuggingdbexpress

Monitor SQL queries executed by a Delphi application


I'd like to monitor SQL queries executed by my application while it runs.

I'm using a dbExpress connection to an Oracle 11g database under Delphi 2007.

This used to be possible under the BDE with the sqlmon.exe utility.

Is there a similar utility for dbExpress?

I've tried the Toad SQL Monitor, which logs two or three queries and then promptly hangs the application. I can set up a full-blown Oracle trace, but that is overkill for everyday debugging.


Solution

  • To be able to monitor querys, you'll have to use a delegate trace driver.

    Read this link, it gives more info on dbexpress 4 and delphi 2007. Note for D2009 users: With D2009, you don't have to tweak ini files anymore, just use the object inspector, it gives the ability to stack up delegate drivers directly in the IDE.