Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Newbie: finding out which tables are lock?
Hi All,
I've been trying to write a script to find out which tables are currently locked (e.g someone has not executed a commit after updating a table)
What I have so far is.
select b.username,c.sid,c.owner,
c.object,b.lockwait,a.sql_text
from v$sqltext a, v$session b, v$access c, v$locked_object d, dba_objects e where a.address=b.sql_address and a.hash_value=b.sql_hash_value and b.sid=c.sid and d.object_id=e.object_id
I then tested this by UPDATE a table without a commit. When I execute this
script
it returns nothing. Can any guru out there see the flaw in the script ?
Thanks in advance.
Andrew Received on Tue Oct 24 2000 - 18:26:36 CDT