본문 바로가기

📚Study Note/ORACLE

[오라클] insert 안됨. 무한 script runner.

 

-- 락걸린 테이블 찾기
SELECT 
  V$SESSION.SID
  , V$SESSION.SERIAL#
  , V$SESSION.USERNAME
  , DBA_OBJECTS.OBJECT_NAME
  , V$SESSION.SADDR
  , V$SESSION.OSUSER
  , V$SESSION.PROGRAM
FROM V$LOCKED_OBJECT
LEFT JOIN DBA_OBJECTS
  ON V$LOCKED_OBJECT.OBJECT_ID = DBA_OBJECTS.OBJECT_ID
LEFT JOIN V$SESSION
  ON V$LOCKED_OBJECT.SESSION_ID = V$SESSION.SID
ORDER BY 
  V$SESSION.SID,
  DBA_OBJECTS.OBJECT_NAME;
  
 -- 세션해제쿼리 
alter system kill session '3, 7479'; -- SID, SERIAL#