Query
Posted in 2007
Topics: General Discussion
Hi guys, Does anybody here have a query script that show the user and which tables he´s using or the table and all users who is accessing it ? Or maybe somethng like tat about locks. Thanks, André Luiz _________________________________________________________________ Ligue para os amigos com a Chamada de PC para PC - GRATUITO http://get.live.com/messenger/overview
Hi,
Something like this will give you all the locks in the instance:
database sysmaster;
set isolation to dirty read;
select
dbsname,
tabname[1,12] table
,rowidlk
,type
,owner
,waiter
,b.username[1,8] lock_waiter
,a.sid
,a.username[1,8] lock_owner
from syslocks, syssessions a, outer syssessions b
where owner = a.sid
and waiter = b.sid
order by waiter desc, type desc, table
Marcus
-----Original Message-----
From: andre_rufino@msn.com [mailto:andre_rufino@msn.com]
Sent: Friday, April 13, 2007 5:01 PM
To: ids@iiug.org
Subject: Query [8894]
Hi guys,
Does anybody here have a query script that show the user and which
tables hes using or the table and all users who is accessing it ? Or
maybe somethng like tat about locks.
Thanks,
Andr Luiz
_________________________________________________________________
Ligue para os amigos com a Chamada de PC para PC - GRATUITO
http://get.live.com/messenger/overview
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.