This is urgent. One of my table is locked by something and I can't update records in it, it just hangs up on me but I can insert a new record though. Can you tell me if there is a way to find out if my table is locked? I have used V$locked_object command. I don't know much more. A reply would be appriciated. Thanks.
This is urgent. One of my table is locked by something and I can't update records in it, it just hangs up on me but I can insert a new record though. Can you tell me if there is a way to find out if my table is locked? I have used V$locked_object command. I don't know much more. A reply would be appriciated. Thanks.
Also, how to find what is locking my table?
try use the v$LOCKED_OBJECT, it will also show who the blocker is:
SELECT LPAD(' ',DECODE(l.xidusn,0,3,0)) || l.oracle_username "User Name",
o.owner, o.object_name, o.object_type
FROM v$locked_object l, dba_objects o
WHERE l.object_id = o.object_id
ORDER BY o.object_id, 1 desc
/
SELECT a.sid,a.serial#, a.username,c.os_user_name,a.terminal,
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
Bookmarks