ora-00054

ORA-00054: resource busy and acquire with NOWAIT specified
Cause: The NOWAIT keyword forced a return to the command prompt because a resource was unavailable for a LOCK TABLE or SELECT FOR UPDATE command.

应该是要执行的语句涉及到资源有锁的问题,查看一下,(一般都是因为有事务未提交)

select object_name,machine,
s.program,s.sid,s.serial#,p.spid
from v$locked_object l,dba_objects o ,v$session s ,v$process p
where l.object_id=o.object_id
and l.session_id=s.sid
and s.paddr=p.addr;

找到sid,serial#
alter system kill session ’sid,serial#’;
如果遇到ora-00031


ORA-00031:session marked for kill
Cause:
The session specified in an ALTER SYSTEM KILL SESSION command cannot be killed immediately because the session is involved in a non-interruptible operation (for example, rolling back a transaction or being blocked by a network operation). The session has been marked to be killed as soon as possible after the current operation is done.
Action:
No action is required for the session to be killed, but further executions of the ALTER SYSTEM KILL SESSION command on this session may cause the session to be killed sooner.

表示此会话已经标记为被删除但是仍然在作一些rollback的工作资源暂时不会被释放
执行:

select object_name,machine,
s.program,s.sid,s.serial#,p.spid
from v$locked_object l,dba_objects o ,v$session s ,v$process p
where l.object_id=o.object_id
and l.session_id=s.sid
and s.paddr=p.addr;
得到SID,然后执行
select spid from v$process p,v$session vwhere p.addr=v.paddrand v.sid=?
最后用OS来KILL
kill spid



评论暂缺

(Required)
(Required, will not be published)