원문 : http://blog.naver.com/dozuq/14972088
-- 세션 조회
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'
AND C.OBJECT_NAME = '[테이블명]'
;
-- 세션 제거...
ALTER SYSTEM KILL SESSION '[SID], [SERIAL]';
ALTER SYSTEM KILL SESSION '416, 46371';
---------------------------------------------------
출처 : http://blog.naver.com/bsc3425/10141921934
============== 락 상태 확인 =====
SELECT CC.SID, CC.SERIAL#, BB.OWNER,BB.OBJECT_NAME,CC.MACHINE,CC.PROGRAM,CC.TERMINAL
FROM V$LOCKED_OBJECT AA,
ALL_OBJECTS BB,
V$SESSION CC
WHERE BB.OBJECT_ID = AA.OBJECT_ID
AND CC.SID = AA.SESSION_ID
============== 락걸린테이블 확인 확인========
SELECT OBJECT_ID,SESSION_ID FROM V$LOCKED_OBJECT
/
============== 테이블 확인 ==============
SELECT * FROM ALL_OBJECTS WHERE OBJECT_ID = OBJECT_ID
/
============== 세션확인 ================
SELECT * FROM V$SESSION WHERE SID = 278;
SID,SERIAL#
/
============== 세션죽이기 =============
ALTER SYSTEM KILL SESSION '132,58458'; ------SID,SERIAL#
SELECT sid, count(sid) cursor
FROM V$OPEN_CURSOR
GROUP BY sid
ORDER BY cursor DESC
SELECT 'ALTER SYSTEM KILL SESSION '''||SID||','||SERIAL#||''';'
FROM V$SESSION
-- WHERE SID = 11
WHERE SID IN (145,130,63,144,134,110,131);