If you get this error while operating on a table on Oracle Database, it means that the table is being used by someone else.
Error:
ORA-00054: Resource Busy And Acquire With NOWAIT Specified Or Timeout Expired
You can use the code block below to find or kill the person occupying the table.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | select c.owner, c.object_name, c.object_type, b.sid, b.serial#, b.status, b.osuser, b.machine from v$locked_object a, v$session b, dba_objects c where b.sid = a.session_id and a.object_id = c.object_id; |
1 | ALTER SYSTEM KILL SESSION 'sid,serial#'; |