From: "Art S. Kagel" <kagel@bloomberg.net>
>
>Obnoxio The Clown wrote:
>>
>> >How to obtain the last executed SQL statement?
>>
>> If you're using IDS, onstat -g sql <sessionid> or onstat -g ses
>> <sessionid>
>
>Be careful using onstat -g sql on a multiprocessor machine with
several
>CPUS and many users. The query this creates against the SMI tables
may
>NEVER complete since you are chasing the end of a list that is
growing
>constantly and with many users it is growing quickly and with many
>CPUS that growth does not have to stop to process your query so.....
>
>I've started onstat -g sql sessions, and the equivalent SQL thanks to
>a well meaning but misguided Informix consultant, that ran for days
>and did not complete. Even killing the session does not stop the
>query from continuing! One such session started eating resources
until
>it crashed the engine, but that is rare, usually it just runs with no
>external effect.
Charming! :-)
Surely this doesn't apply if you use a sessionid, though?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com