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#';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/2361091/viewspace-674352/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/2361091/viewspace-674352/