Re: Tracing sql statements
Posted in 1999
Topics: Performance & Tuning
Simpson, Don wrote: > > I too would like to know if there really is a way to capture every sql > statement of a user. I believe that's not an option. I'm writting a quick and dirty proggy that goes "select distinct sqx_sqlstatement from syssqexplain" every configurable interval and sticks the results in a different database.table. I hope to have caught all queries after some time. It's nothing fantastic but it helps - if you want it, mail me. -- /* ----------------------------------------------------- * * Willem Roos wroos@shoprite.co.za * * roosj@mweb.co.za * * 0(+27)21 980 4941 * * 0(+27)21 919 0198 * * ----------------------------------------------------- */
Don Simpson wrote: > I too would like to know if there really is a way to capture > every sql statement of a user. I don't recall which version numbers are under discussion. I have a surrogate for sqlexec or sqlturbo which can be used in version 5.x and earlier systems to monitor the communications between program and database. Actually, I have a couple of them, but that's another story. For ClientSDK programs, there's the sqliprint program which can be used on the log files generated when you set some environment variable -- my memory fails me at home, late at night, when I'm typing this. If you're using earlier versions of ESQL/C, then you may be able to get hold of sqliprint after all, but probably not and you are stuck. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
I asked the original question and I'm on 7.2 Thanks, Fred