试图删除表中的Oracle错误

时间:2016-02-16 09:02:49

标签: sql oracle drop-table

我只是试图放弃表但却出错。我刚刚创建了它的hbm文件并检查代码,现在服务器已经开始指向同一个数据库。看起来会话被锁定了。我收到了以下错误。

Error starting at line 1 in command:
alter table DM_PKG_TEMPLATE drop column INSP_STAGE_ID
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.

1 个答案:

答案 0 :(得分:0)

执行给定的查询以检查您的表是否在Lock中。 如果锁定则终止会话并删除列。

SELECT A.SID,A.SERIAL#,A.OSUSER,A.PROCESS,C.OBJECT_NAME
  FROM V$SESSION A,V$LOCKED_OBJECT B,DBA_OBJECTS C
 WHERE A.SID = B.SESSION_ID
   AND B.OBJECT_ID = C.OBJECT_ID
   AND C.OBJECT_NAME LIKE '%PDM_PKG_TEMPLATE%'