官方文档的内容 ORA-00054 resource busy and acquire with NOWAIT specifiedCause: The NOWAIT keyword forced a return to the command prompt because a resource was unavailable for a LOCK TABLE or SELECT FOR UPDATE command.Action: Try the command after a few minutes or enter the command without the NOWAIT keyword.原因除了表被锁之外,select for update也可能造成此问题
ORA-00054 resource busy and acquire with NOWAIT specifiedCause: The NOWAIT keyword forced a return to the command prompt because a resource was unavailable for a LOCK TABLE or SELECT FOR UPDATE command.Action: Try the command after a few minutes or enter the command without the NOWAIT keyword.原因除了表被锁之外,select for update也可能造成此问题
用有30个子分区
按时间P1-P30,P1清理不掉,v$locked_object里没有锁,但是P2,P3可以清理掉
实在不行只能重启数据库了,否则只能等待自己释放,貌似没啥其他好的方法了
SELECT a.spid,b.sid,b.serial#,b.username FROM v$session b,v$process a WHERE a.addr = b.paddr AND b.status = 'KILLED';
--SELECT spid,osuser,s.program FROM v$session s,v$process p WHERE s.paddr = p.addr AND s.SID = '149';(上面查到的sid)
--在OS上杀死这个进程
--unix中用root身份执行: #-9 12345 (即上面查询出来的 sid/spid)
--用orakill杀死线程(unix也适用),orakill是oracle提供的一个可执行命令,语法为 orakill sid thread
--其中 sid:要杀死的进程属于的实例名 thread:是要杀掉的线程号,即spid/sid