有时候在drop表或者其他对象的时候,会遇到ORA-00054:资源正忙,要求指定NOWAIT(中文字符集)或者ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired错误(英文字符集),Oracle官方解决方案: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired Cause: Interest
Oracle解锁,解决“ora00054:资源正忙”错误 一.处理步骤:--1.获取被锁对象的session_idSELECT session_id FROM v$locked_object; --2.通过session_id获取v$session的sid和serial#SELECT sid, serial#, username, osuser FROM v$session where sid = session_id; --3.终止相关进程.ALTER SYSTEM KILL SESSION
--ORA-00054:资源正忙,要求指定NOWAIT-- --以DBA角色, 查看当前数据库里锁的情况可以用如下SQL语句-- SELECT sid, serial#, username, osuser FROM v$session WHERE sid IN(SELECT session_id FROM v$locked_object); --杀掉锁-- ALTER SYSTEM KILL SESSION 'sid,serial#'; ALTER SYSTEM KILL SESSION '15
1)查找死锁的进程: SELECT s.username,l.OBJECT_ID,l.SESSION_ID,s.SERIAL#,l.ORACLE_USERNAME,l.OS_USER_NAME,l.PROCESS FROM V$LOCKED_OBJECT l,V$SESSION S WHERE l.SESSION_ID=S.SID;2)kill掉这个死锁的进程: alter system kill session 'sid,serial#'; (其中sid=l.session_id)
现象: 执行update.truncate提示 ORA-00054: resource busy and acquire with NOWAIT specified. 解决方法: 因为系统是RAC系统,当时在第一个node没有查询到锁状态,查看第二台时候才看到锁的信息 1.查询数据库中的锁 select * from v$lock; select * from v$lock where block=1; 2.查询被锁的对象 select * from v$locked_object; 3.查询阻
1.查询被锁的会话ID: select session_id from v$locked_object;查询结果:SESSION_ID-------92.查询上面会话的详细信息: SELECT sid, serial#, username, osuser FROM v$session where sid = 9; 3.将上面锁定的会话关闭: ALTER SYSTEM KILL SESSION '9,99';
打开sql plus select session_id from v$locked_object;查询出oracle锁定的会话ID SELECT sid, serial#, username, osuser FROM v$session where sid = 1; 查询出当前会话数的信息 ALTER SYSTEM KILL SESSION '200,2141'; 杀掉当前会话 注:'200,2141'是:SID和SERIAL字段进行拼接的