当我试图删除一个表时,我会得到这个错误。
我已经在谷歌上搜索过,并且尽我最大的能力尝试了所有可能的解决方案,但到目前为止,它们都没有为我工作过。
这是我正在犯的错误:
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.请记住,我对SQLDeveloper或SQL本身不太了解,所以请尽量详细说明。
谢谢!
发布于 2015-04-13 11:45:04
ORA-00054:资源繁忙并使用指定的NOWAIT获取
很明显,存在一个操作表的会话,即执行了一个DML语句,但是没有发出提交或回滚。而且,您正在尝试从中删除表(另一个会话)。
请注意,当您打开多个选项卡时,即打开多个SQL工作表时,会出现不同的会话。
一个小型演示来重现和修复您的问题:
SESSION# 1
SQL> create table t(a number);
Table created.
SQL> insert into t select 1 from dual;
1 row created.
SQL>因此,我在SESSION# 1中做了一个插入,但还没有提交它。
SESSION# 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中的表时,我会得到错误。
要修复它,可以提交或回滚session# 1。
SESSION# 1
SQL> commit;
Commit complete.
SQL>SESSION# 2
SQL> drop table t purge;
Table dropped.
SQL>https://stackoverflow.com/questions/29603267
复制相似问题