esource busy and acquire with NOWAIT specified 解决方法

1. 通过dba_objects 查到锁掉的对象的object_id.
select object_nameobject_id from dba_objects
where object_name like ‘*****’;
2.在v$_locked_object中找到锁掉的session_id
select session_id,object_id from v$locked_object
where object_id=***;
3.在v$_session 找到锁掉的session的sid及serial#
select username,sid,serial# frin v$session
where sid=****;
4.根据SID查找对应的sql
select sql_text from v$session a,v$sql_text_with_newlines b
where DECODE(a.sql_hash_value,0,prev_hash_value,sql_hash_value)=b.hash_value
and a.sid=***;
5.如果确认了sid是sql是不重要的,则kill对应的session即可
alter system kill session ‘SID,SERIAL#’;

1. 通过dba_objects 查到锁掉的对象的object_id.     select object_nameobject_id from dba_objects where object_name like ‘*****’;2.在v$_locked_object中找到锁掉的session_id select session_id,object_id from v$locked_object where object_id=***;3.在v$_session 找到锁掉的session的sid及serial# select username,sid,serial# frin v$session where sid=****;4.根据SID查找对应的sql select sql_text from v$session a,v$sql_text_with_newlines b where DECODE(a.sql_hash_value,0,prev_hash_value,sql_hash_value)=b.hash_valueand a.sid=***;5.如果确认了sid是sql是不重要的,则kill对应的session即可alter system kill session ‘SID,SERIAL#’;

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>