출처 : http://timeless0312.blogspot.com/2010/05/lock.html
SELECT
T1.OBJECT_NAME
, DECODE(LOCKED_MODE, 2, 'ROW SHARE', 3, 'ROW EXCLUSIVE', 4, 'SHARE', 5, 'SHARE ROW EXCLUSIVE', 6, 'EXCLUSIVE', 'UNKNOWN') LOCK_MODE
FROM DBA_OBJECTS T1
, V$LOCKED_OBJECT T2
WHERE 1=1
AND T1.OBJECT_ID = T2.OBJECT_ID
/* Lock 확인 쿼리 */
SELECT
DO.OBJECT_NAME
, DO.OWNER
, DO.OBJECT_TYPE
, DO.OWNER
, VO.XIDUSN
, VO.SESSION_ID
, VO.LOCKED_MODE
FROM V$LOCKED_OBJECT VO , DBA_OBJECTS DO
WHERE 1=1
AND VO.OBJECT_ID = DO.OBJECT_ID
/* 테이블의 lock 확인 */
SELECT
A.SID
, A.SERIAL#
, B.TYPE
, C.OBJECT_NAME
FROM V$SESSION A
, V$LOCK B
, DBA_OBJECTS C
WHERE 1=1
AND A.SID=B.SID
AND B.ID1=C.OBJECT_ID
AND B.TYPE='TM'
AND C.OBJECT_NAME IN ('LSGMACT')
/* V$LOCK 을 사용한 잠금 경합 모니터링 */
SELECT
S.USERNAME
, S.SID
, S.SERIAL#
, S.LOGON_TIME
, DECODE(L.TYPE, 'TM', 'TABLE LOCK', 'TX', 'ROW LOCK', NULL) "LOCK LEVEL"
, O.OWNER
, O.OBJECT_NAME
, O.OBJECT_TYPE
FROM V$SESSION S
, V$LOCK L
, DBA_OBJECTS O
WHERE 1=1
AND S.SID = L.SID
AND O.OBJECT_ID = L.ID1
AND S.USERNAME IS NOT NULL
/* 락이 걸린 세션 자세히 알아보기 */
SELECT
A.SID
, A.SERIAL#
, A.USERNAME
, A.PROCESS
, B.OBJECT_NAME
, DECODE(C.LMODE,2,'RS',3,'RX',4,'S',5,'SRX',8,'X','NO') "TABLE LOCK"
, DECODE (A.COMMAND,2,'INSERT',3,'SELECT',6,'UPDATE',7,'DELETE',12,'DROP TABLE',26,'LOCK TABLE','UNKNOWN') "SQL"
, DECODE(A.LOCKWAIT, NULL,'NO WAIT','WAIT') "STATUS"
FROM V$SESSION A
, DBA_OBJECTS B
, V$LOCK C
WHERE 1=1
AND A.SID=C.SID
AND B.OBJECT_ID=C.ID1
AND C.TYPE='TM'
출처 : http://blog.daum.net/kittel76/11548487
ORA-00054: resource busy and acquire with NOWAIT specified