롹걸린 테이블 찾아 확인하고 죽이기
2011. 7. 19. 13:23ㆍ99. 정리전 - IT/15. SQL 따라잡기
락걸린 테이블 찾기
SELECT A.SID ,
A.SERIAL#,
A.OSUSER ,
T.OS_USER_NAME,
T.ORACLE_USERNAME,
A.STATUS,
A.PROGRAM
, S.SQL_TEXT
FROM V$SESSION A , V$LOCKED_OBJECT T , V$SQL S
WHERE A.SID = T.SESSION_ID AND
A.SQL_ADDRESS =S.ADDRESS
AND A.SQL_HASH_VALUE=S.HASH_VALUE;
A.SERIAL#,
A.OSUSER ,
T.OS_USER_NAME,
T.ORACLE_USERNAME,
A.STATUS,
A.PROGRAM
, S.SQL_TEXT
FROM V$SESSION A , V$LOCKED_OBJECT T , V$SQL S
WHERE A.SID = T.SESSION_ID AND
A.SQL_ADDRESS =S.ADDRESS
AND A.SQL_HASH_VALUE=S.HASH_VALUE;
락걸린 테이블 확인
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;
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'
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 '1054, 34101';