Wednesday, September 3, 2008

Who is Locking my Object ?

Find out using this script....

SELECT a.sid,a.serial#, a.username,c.os_user_name,a.terminal,c.process,
b.object_id,substr(b.object_name,1,40) object_name
from v$session a, dba_objects b, v$locked_object c
where a.sid = c.session_id
and b.object_id = c.object_id
/