|
-
The following query will identify users that are currently being locked in the system.
select b.username, b.serial#, d.idl1, a.sql_text
from v$session b, v$lock d, v$sqltext a
where b.lockwait = d.kaddr
and a.address = b.sql_address
and a.hash_value = b.sql_hash_value;
The next query will identify users in the system that are causing the problems of locking.
select a.serial#, a.sid, a.username, b.idl1, c.sql_text
from v$session a, v$lock b, v$sqltext c
where b.id1 in
(select distinct e.id1
from v$session d, v$lock e
where d.lockwait = e.kaddr)
and a.sid = b.sid
and c.hash_value = a.sql_hash_value
and b.request = 0;
I hope this helps, if not let me know and I will see what else I have in my bag of tricks!
Learning something new everyday
Forgetting something useful every minute!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|