1

I'm getting this error when trying to DROP a table.

I've googled and googled and tried all possible solutions to the best of my abilities but none of them have worked for me so far.

This is the error I'm getting:

Error starting at line : 1 in command -
DROP TABLE INTEREST
Error report -
SQL Error: ORA-00054: resource busy and acquire with NOWAIT specified
00054. 00000 -  "resource busy and acquire with NOWAIT specified"
*Cause:    Resource interested is busy.
*Action:   Retry if necessary.

Keep in mind I'm not that knowledgable about SQLDeveloper or SQL itself so please try and be as elaborate as possible.

Thank you!

4

1 回答 1

2

ORA-00054: 资源繁忙并使用指定的 NOWAIT 获取

错误很明显,存在一个操作表的会话,即执行了DML语句,但是没有发出COMMITROLLBACK 。而且,您正试图从另一个会话DROP表。

请注意,当您打开多个选项卡时,即当您打开多个 SQL 工作表时,会有不同的会话

一个小演示来重现和解决您的问题:

会议#1

SQL> create table t(a number);

Table created.

SQL> insert into t select 1 from dual;

1 row created.

SQL>

所以,我在 SESSION#1 中做了一个 INSERT,但还没有提交。

会议#2

SQL> drop table t purge;
drop table t purge
           *
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired


SQL>

所以,当我试图在会话 2 中删除表时,我得到了错误。

要修复它,请 COMMIT 或 ROLLBACK session# 1。

会议#1

SQL> commit;

Commit complete.

SQL>

会议#2

SQL> drop table t purge;

Table dropped.

SQL>
于 2015-04-13T11:45:04.880 回答