oracle之报错:ORA-00054: 资源正忙,要求指定 NOWAIT
SQL> drop table student2;
drop table student2
ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效
=========================================================
解决方法如下:
=========================================================
SQL> select session_id from v$locked_object;
SESSION_ID
----------
SQL> select sid, serial#, username, osuser from v$session where sid = 142;
---------- ---------- ------------------------------ ------------------------------
SQL> alter system kill session '142,38';
一般情况下用:alter system kill session 'sid,serial#'都可以处理,但是如果在搓澡的过程中又遇到了killed的状态的时候
SQL>select a.spid,b.sid,b.serial#,b.username from v$process a,v$session b where a.addr=b.paddr and b.status='KILLED'
那么解决方式:
在alter system kill session 'sid,serial#'的后面加上immediate
SQL> ALTER SYSTEM KILL SESSION '142,38' immediate;