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.
The poster asked whether there's a sysmaster SQL query equivalent to 'onstat -g ses <session id>'. Replies pointed to the sysmaster syssessions view, searching on the sid column. When he said he also needed the current/last SQL statement, Art Kagel suggested joining to sysrstcb via the tid (he first mistyped it as 'stsrstcb', corrected later). John Miller added that reproducing the full long 'onstat -g ses' output requires syssessions, syspoollst, systcblst and sysrstcb, noting some fields are hard to obtain. No complete sample query was posted.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hi
Query the sysmaster:syssessions table, the primary key is sid field.
Best regards.
Em 17/01/2011 13:18, KHURRAM SHAHZAD escreveu:
> Hi,
> Is there any sysmaster query which is substitute of onstat -g ses<session id>
> command ?
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Alexandre Marini
Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix
Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg>
IBM Certified System Administrator - Informix Dynamic Server V10 / V11
Sorry about the primary key, I meant you can search for the sid field, ok?
Em 17/01/2011 13:29, Alexandre Marini escreveu:
> Hi
> Query the sysmaster:syssessions table, the primary key is sid field.
>
> Best regards.
>
> Em 17/01/2011 13:18, KHURRAM SHAHZAD escreveu:
>> Hi,
>> Is there any sysmaster query which is substitute of onstat -g ses<session
> id>
>> command ?
>>
>>
>>
>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
--
Alexandre Marini
Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix
Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg>
IBM Certified System Administrator - Informix Dynamic Server V10 / V11
You can look at the syssessions view.
John F. Miller III
STSM, Embedability Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 01/17/2011 09:18:51 AM:
> [image removed]
>
> sysmaster query [22449]
>
> KHURRAM SHAHZAD
>
> to:
>
> ids
>
> 01/17/2011 09:23 AM
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Please respond to ids
>
> Hi,
> Is there any sysmaster query which is substitute of onstat -g ses
> <session id>
> command ?
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Join to stsrstcb by the tid
Art
On Jan 17, 2011 11:49 AM, "KHURRAM SHAHZAD" <kshahzad02@i2cinc.com> wrote:
> I want current and last sql statement additional which is not in
syssessions
> so how can i get this
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--001636c5b15bafe61f049a0e6d7a
If you want the long listing of onstat -g ses
Then you will need the following tables
syssessions
syspoollst
systcblst
sysrstcb
Some items are easy to get, but some will be very hard to get.
John F. Miller III
STSM, Embedability Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 01/17/2011 09:52:38 AM:
> [image removed]
>
> Re: sysmaster query [22454]
>
> Art Kagel
>
> to:
>
> ids
>
> 01/17/2011 09:53 AM
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Please respond to ids
>
> Join to stsrstcb by the tid
>
> Art
> On Jan 17, 2011 11:49 AM, "KHURRAM SHAHZAD" <kshahzad02@i2cinc.com>
wrote:
> > I want current and last sql statement additional which is not in
> syssessions
> > so how can i get this
> >
> >
> >
>
>
*******************************************************************************
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
> --001636c5b15bafe61f049a0e6d7a
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Typo, sorry. That should be "sysrstcb"
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Mon, Jan 17, 2011 at 1:25 PM, KHURRAM SHAHZAD <kshahzad02@i2cinc.com>wrote:
> stsrstcb table is not found in sysmaster please guid me
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5b15bf31673049a1516fe
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.