Link to home
Start Free TrialLog in
Avatar of josephdaviskcrm
josephdaviskcrmFlag for United States of America

asked on

Oracle database Error - ORA-00054: resource busy and acquire with NOWAIT specified

I'm trying to build a database in Oracle and I am using a .txt file to get all the code correctly typed and use the START 'path of file' command to run it all at once.  Of course I have drop table commands at the beginning of the .txt file so that any of the tables that I hade created previously would not error out when running the .txt file over again tried to create the tables again.  Everything seemed to be working fine, but I started getting an error on my drop statements:

SQL> DROP TABLE S_COURSE_SECTION CASCADE CONSTRAINTS PURGE;
DROP TABLE S_COURSE_SECTION CASCADE CONSTRAINTS PURGE
           *
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified

Is this error something that I am doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of josephdaviskcrm

ASKER

I am the only user, and I've already done a commit.  I got confirmation that the commit was complete.
unfortunately, that is the only situation to get that error message, AFAIK
The cascade constraints could be getting you too.

To find the session that has a lock on the table, try this query:

select a.sid, c.username, c.program
  from v$lock a, dba_objects b, v$session c
 where a.id1 = b.object_id and
       b.owner = 'S_COURSE_SECTION' and
       b.object_type = 'TABLE' and
       a.sid = c.sid;

Open in new window