ORA-00054: resource busy and acquire with NOWAIT specified

ora-00054, oracle, sql, unix

Solution

Step 1:

select object_name, s.sid, s.serial#, p.spid 
from v$locked_object l, dba_objects o, v$session s, v$process p
where l.object_id = o.object_id and l.session_id = s.sid and s.paddr = p.addr;

Step 2:

alter system kill session 'sid,serial#'; --`sid` and `serial#` get from step 1

More info: http://www.oracle-base.com/articles/misc/killing-oracle-sessions.php

Problem

I killed a script that was in the middle of updating a table. Now when I rerun the script I am getting, ORA-00054: resource busy and acquire with NOWAIT specified I presume the table is locked? How do I unlock the table?

Original source