oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT

oracle11g某张表只能查询,增删改都不可以,不能drop,而且truncate都失败会报错ORA-00054:资源正忙,要求指定NOWAIT

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第1张图片

处理步骤如下:

查看被锁的表和引起锁表的session:

select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b

where b.object_id = a.object_id

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第2张图片


select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2

 where t1.session_id=t2.sid order by t2.logon_time

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第3张图片


select xidusn,object_id,session_id, oracle_username,os_user_name from v$locked_object ;

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第4张图片


select object_id,object_name from dba_objects where object_id=‘145943’

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第5张图片


alter system kill session '25,1' ;

oracle11g报错ORA-00054:资源正忙,要求指定NOWAIT_第6张图片


select a.spid,b.sid,b.serial#,b.username,b.status from v$process a,v$session b where a.addr=b.paddr

在windows cmd.exe執行orakill oracle_instance spid


进程杀掉以后就可以truncate了,问题解决了。


你可能感兴趣的:(数据库)