1.如果update 某个表,没有报错,等待很久都没结束,那很有可能是表被锁了。

2.查看被锁的对象

select sid,serial#,username,SCHEMANAME,osuser,MACHINE,terminal,PROGRAM,owner,object_name,object_type,o.object_id
from dba_objects o,v$locked_object l,v$session s
where o.object_id=l.object_id and s.sid=l.session_id;  

3.杀掉inactive的锁表的session

alter system kill session 'sid,serial#';

alter system kill session '491,47198';

4.查看当前的session

select * from v$mystat where rownum = 1

转自: http://blog.163.com/liyani_1980/blog/static/38604145201351033139921/

05-11 00:11