Identify tables by session
Posted in 2016
Topics: General Discussion
Hi,
I have some concurrency problems with some tables, I use the opn option over
onstat, but there is any way I can get the tables name used on each session.
Because I don't have any locks for informix, so it is difficult to understand
the problem!
I apprecitte any help!
Thanks,
Hello Sérgio,
Not sure exactly what is the problem/question. If you don't have locks what
is the concurrency problem?
If I recall correctly your last question you were wondering how to force
all the sessions to quit so that you could change some tables.
In order to ALTER a table you need that table not to be "in use". That
means there can't be cursors on the table.
If you need to find who is preventing an ALTER table I have a script that
should be able to help you.
But it also uses onstat -g opn. This option shows the open table per
thread. You can use the partnum value to find the table:
SELECT * FROM systabnames WHERE partnum = '0x..........' (the value shownby onstat.
In any case the script I'm referring to is:
https://github.com/domusonline/InformixScripts/blob/master/scripts/ix/ixtableuse
Regards
On Thu, Apr 21, 2016 at 11:23 PM, SERGIO PERES <sergio.peres@airc.pt> wrote:
> Hi,
>
> I have some concurrency problems with some tables, I use the opn option
> over
> onstat, but there is any way I can get the tables name used on each
> session.
> Because I don't have any locks for informix, so it is difficult to
> understand
> the problem!
> I apprecitte any help!
>
> Thanks,
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--14dae9340ed5bef5ff053106f15f
Hola Sergio, buen día te paso una consulta sobre la sysmaster
select s1.username,s1.sid,waiter,s2.username,dbsname,tabname,
rowidlk,keynum,type,s1.pid
from sysmaster:syslocks l, sysmaster:syssessions s1, syssessions s2
where s1.sid = l.owner
and waiter = s2.sid
yo lo llamo desde la línea de comandos
Espero te sirva
Saludos
Ing. Susana Barea
DBA Poder Judicial Mendoza
----- Mensaje original -----
De: "SERGIO PERES" <sergio.peres@airc.pt>
Para: ids@iiug.org
Enviados: Jueves, 21 de Abril 2016 19:23:47
Asunto: Identify tables by session [37018]
Hi,
I have some concurrency problems with some tables, I use the opn option over
onstat, but there is any way I can get the tables name used on each session.
Because I don't have any locks for informix, so it is difficult to understand
the problem!
I apprecitte any help!
Thanks,
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g