[IQUG] How to identify a hung SQL or the connection handle

Steve Shen sshen at sscinc.com
Wed Jan 17 14:57:54 MST 2018


Hi Ron,

Thank you very much for your feedback.  I am going to test different parameters shortly.

Thanks and regards,
Steve Shen

From: Ron Watkins [mailto:rwatkins at dssolutions.com]
Sent: Wednesday, January 17, 2018 4:54 PM
To: Steve Shen; iqug at iqug.org
Subject: RE: [IQUG] How to identify a hung SQL or the connection handle

Identificdation of "stale" depends on multiple user-defined parameters.

Here's a query which shows some of these parameters... This should give you an idea of what to look for and where to look for it.

            select      i.ConnHandle,
                        u.user_name
            from        sp_iqconnection() i
            join        SYSUSERPERM u
            on          connection_property('Userid',i.ConnHandle) = u.user_name
            where       i.IQCmdType = 'NONE'                                    -- No current command.
            and         i.IQthreads < 1                                         -- No thread.
            and         i.LastIQCmdTime > '0001/01/01'                          -- Actual TIME recorded.
            and         minutes(i.LastIQCmdTime,current timestamp) >= 15        -- Hardcoded time limit.
            and         i.LowestIQCursorState in ('NONE','END_OF_DATA')         -- Active fetching?

From: iqug-bounces at iqug.org<mailto:iqug-bounces at iqug.org> [mailto:iqug-bounces at iqug.org] On Behalf Of Steve Shen
Sent: Wednesday, January 17, 2018 2:31 PM
To: iqug at iqug.org<mailto:iqug at iqug.org>
Subject: [IQUG] How to identify a hung SQL or the connection handle

Subject: How to identify a stale connection session?

Does anyone know how to identify a SQL execution or a Connection Handle  is at the stale status?

The IQ server was up and running; but certain SQL statements' executions were hung.  How can we identify these connection handles or the hung SQL statements?

Thank you.

Regards
Steve Shen

This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://iqug.org/pipermail/iqug/attachments/20180117/6156128c/attachment-0001.html>


More information about the IQUG mailing list