Skip to the content.

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

해당 오브젝트에 Lock이 걸려있음

  1. Lock이 걸린 SID 찾기
     SELECT SID, SERIAL# FROM V$SESSION
     WHERE SID IN (
         SELECT SID FROM V$LOCK WHERE TYPE IN ('TM', 'TX')
     );
    
     --해당 오브젝트가 Lock이 걸렸는지를 확인
     SELECT SID, SERIAL# FROM V$SESSION
     WHERE SID IN (
         SELECT L.SID FROM V$LOCK L
         JOIN ALL_OBJECTS O ON (L.ID1 = O.OBJECT_ID)
         WHERE L.TYPE IN ('TM', 'TX') AND O.OBJECT_NAME = "object_name"
     );
    
  2. 해당 SID 강제 종료 (SYSDBA 권한)
     ALTER SYSTEM KILL SESSION 'sid, serial#';