• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8198
  • Last Modified:

drop table with force.

i want to drop a table and i am encountering ...

resource busy and acquire with NOWAIT specified

i want to drop it by force .... how to do it ?
0
vishali_vishu
Asked:
vishali_vishu
  • 2
1 Solution
 
schwertnerCommented:
You should first to stop the session that has locked the table.

To enconter the session

select s.sid, s.serial#, p.spid
from v$session s, v$process p
where s.paddr = p.addr and s.sid in (select SESSION_ID from V$LOCKED_OBJECT)

Now drop the session

It is possible to force the kill by adding the IMMEDIATE keyword:
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
This should prevent you ever needing to use the orakill.exe in Windows, or the kill command in UNIX/Linux.
0
 
schwertnerCommented:
Good luck!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now