which users are accessing tables ?
Posted in 1999
David CHANG — — source: Informix-list mailing list archive (1991-1998)
OS:hpux 11.0 +ids7.3
I wrote a sql script to known which users accessing some tables,
$cat smi2.sql
select username,pid,sid,tty
from syssessions
into temp a;
select unique o.waiter,a.username,a.tty
from syslocks o,a
where o.waiter is not null
and o.waiter=a.sid
into temp b;
select
o.dbsname[1,7],o.tabname[1,7],o.rowidlk,o.type,a.username[1,8],a.tty[6,12],a
.pid,b.username[1,8],b.waiter
from syslocks o,a,outer b
where o.owner=a.sid
and o.waiter=b.waiter
order by 1 DEC,2
$dbaccess sysmaster ./smi2.sql
there are some errors happen when select syslocks,cause there are no any
rows exist in syslocks !
How to fix to problem ?