-- 락이 걸려있는 테이블을 조회한다 --

SELECT vo.session_id,do.object_name, do.owner, do.object_type,do.owner, 
vo.xidusn, vo.locked_mode 
FROM v$locked_object vo , dba_objects do 
WHERE vo.object_id = do.object_id
;

 

-- 락이 걸려있는 테이블이 몇개인지 확인한다 --

SELECT count(*)
FROM v$locked_object vo , dba_objects do 
WHERE vo.object_id = do.object_id

select a.sid, a.serial#
from v$session a, v$lock b, dba_objects c
where a.sid=b.sid and
b.id1=c.object_id and
b.type='TM' 
;

 

-- 해당되는 테이블 락을 해제시킨다 --

alter system kill session '10,23779';
alter system kill session '14,22484';
commit;

+ Recent posts