Hi all,
just an inquiry. i am using the select statement below to validate if there's
a runaway process.
database sysmaster;
select tabname[1,20], l.owner, s.tty[1,15], pid, l.waiter
from syslocks l, syssessions s
where waiter is not null
and l.owner = s.sid
order by 2,4
can i use the same query to check for locked tables or processes running too
long?
btw, i'm using IDS 9.4 and AIX.
How can i check the parent and child sessions,is there a way?
thanks,
↪ replying to JACK PAPA
JACK PAPA Wrote:
Hi all,
just an inquiry. i am using the select statement below to validate if there's
a runaway process.
database sysmaster;
select tabname[1,20], l.owner, s.tty[1,15], pid, l.waiter
from syslocks l, syssessions s
where waiter is not null
and l.owner = s.sid
order by 2,4
can i use the same query to check for locked tables or processes running too
long?
btw, i'm using IDS 9.4 and AIX.
How can i check the parent and child sessions,is there a way?
Response:
The query you mention is verbatim what I shared back on July 8 in response to
your question "How to check what processid is blocking another process?". I
would not label a process as a runaway simply because it is returned by this
query. Having sessions waiting for locks held by other sessions is normal.
However, I would hope it is infrequent and that the locks are not retained for
an extended time. If locks are on this list for a few minutes(or long enough
for users to start complaining), I investigate what the session owning the
locks is doing.
This specific query is only going to return information about a lock if
another session is waiting for it to be freed. You can query syslocks in many
ways to see what tables have locks or what tables a specific sessionid(owner)
is locking. Leave off the waiter is not null for a full list. Take a look at
the Admin Reference Guide for information on syslocks and other sysmaster
tables.
I don't know what you mean by parent and child sessions. The owner column
returned by the query is the session id of the owner. The waiter column is
session id of the waiter. You can do an onstat -g ses on either of these.
Although, you already know what the waiter session is doing...
Dave Griffen