Trying to drop the table getting error in Oracle

5.7k Views Asked by At

I am just trying to drop the table but getting error. I have just created hbm files of it and checkin the code now that server has been started pointing to the same db. Looks to session got locked. I am getting below error.

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

There are 1 best solutions below

1
On

Execute the given query to check if your table is in Lock. if locked kill the session and drop the column.

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%'