Friday, January 17, 2014

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

Find the blocking session port, and then kill the process listening on that port.
SELECT O.OBJECT_NAME, S.SID, S.SERIAL#, P.SPID, S.PROGRAM,S.USERNAME,
S.MACHINE,S.PORT , S.LOGON_TIME,SQ.SQL_FULLTEXT 
FROM V$LOCKED_OBJECT L, DBA_OBJECTS O, V$SESSION S, 
V$PROCESS P, V$SQL SQ 
WHERE L.OBJECT_ID = O.OBJECT_ID 
AND L.SESSION_ID = S.SID AND S.PADDR = P.ADDR 
AND S.SQL_ADDRESS = SQ.ADDRESS;
[root@dwh1 ~]# netstat -ap | grep 22735
tcp        1      0 dwh1.prod.mbqt:ncube-lm     dwh1.prod.mbqt:22735        CLOSE_WAIT  19050/oracledwhmbqt 

[root@dwh1 ~]# kill -9 19050