Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Steven Weiss wanted the SQL a session was running before SESSION_LIMIT_MEMORY terminated it; alarmprogram did not catch it. Marcus Haarmann suggested trapping the error code with onmode -I. Andreas Legner advised trapping errno 25582 to produce an af file at termination. Kelly Doyle gave generic advice about monitoring tools and logs. No confirmation of the result.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Steven Weiss — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi All,
I have SESSION_LIMIT_MEMORY set and I'm trying to find out what sql the session was running just before the engine terminates it. On occasion, we encounter a session with high memory usage.
I've tried alarmprogram but seems engine terminates the session prior to hitting this script.
Any ideas ?
Regards
Steven
↪ replying to Steven Weiss
Marcus Haarmann — source: IBM Community (ConnectedCommunity.org) Informix forum
Did not use that one, but this setting for sure will generate a specific error code.
You could trap this error code with onmode -I <errorcode> in order to see what is going on.
↪ replying to Marcus Haarmann
Steven Weiss — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks, will give that a go, I don't recall if I tried this. Hopefully the session doesn't get terminated prior to the diagnostics getting written.
↪ replying to Steven Weiss
Andreas Legner — source: IBM Community (ConnectedCommunity.org) Informix forum
Try trapping errno 25582.
This should generate an af file capturing the session precisely in the moment of being terminated.
------------------------------
Andreas Legner
------------------------------
↪ replying to Steven Weiss
Kelly Doyle — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi,
To capture the SQL query that a session was running just before it reaches the SESSION_LIMIT_MEMORY and terminates, you can consider using database monitoring tools or querying the database logs directly. These tools can provide insights into the recent queries executed by the session, helping you identify the SQL statement responsible for the high memory usage. Additionally, reviewing database performance monitoring reports or enabling detailed logging can offer further visibility into session activities leading up to the termination.
------------------------------
Kelly Doyle
------------------------------
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.