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

Error:

ORA-39120: Table “OWNER”.”TABLENAME” can’t be truncated, data will be skipped. Failing error is:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired



Solution:


Please see from v$lock if the object is being used by other sessions

SQL

select obect_id1,object_id2 from dba_objects where owner=’schemanname’ and object_name=’table_name’;

select sid from v$lock where id1=’id1_obtained from previous query’ and id2=’obtained from previous query’;

select serial# from v$session where sid=’sid obtained from previous query’;



Kill those sessions or wait until user complete those sessions

alter system kill session ‘serial#,sid’;

  • November 9, 2017 | 30 views