1、首先檢視鎖定的表太程序:
select substr(v$lock.sid,1,4) "sid",
serial#,
v$session.sid,
substr(username,1,12) "username",
substr(object_name,1,25) "objectname",
v$lock.type "locktype",
decode(rtrim(substr(lmode,1,4)),
'2','row-s (ss)','3','row-x (sx)',
'4','share', '5','s/row-x (ssx)',
'6','exclusive', 'other' ) "lockmode",
substr(v$session.program,1,25) "programname"
from v$lock,sys.dba_objects,v$session
where (object_id = v$lock.id1
and v$lock.sid = v$session.sid
and username is not null
and username not in ('sys','system')
and serial# != 1);
2、殺掉鎖表的程序:
alter system kill session 'sid,serial#';
oracle被鎖定表查詢與解鎖
oracle ebs操作某乙個form介面,或者後台資料庫操作某乙個表時發現一直處於 假死 狀態,可能是該錶被某一使用者鎖定,導致其他使用者無法繼續操作 鎖表查詢sql select object name,machine,s.sid,s.serial from gv locked object l...
解除oracle表鎖定
首先查詢阻塞的使用者 select rule s.username,decode l.type,tm table lock tx row lock null lock level,o.owner,o.object name,o.object type,s.sid,s.serial s.termina...
解決Oracle 表鎖定
select b.owner,b.object name,a.session id,a.locked mode from v locked object a,dba objects b where b.object id a.object id select b.username,b.sid,b.s...