码迷,mamicode.com
首页 > 数据库 > 详细

oracle 锁表查看与解锁

时间:2017-06-02 21:11:04      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:logo   serial   查看   session   objects   color   log   oracle 锁   alter   

查看被锁的表:

select l.session_id,o.owner,o.object_name
from v$locked_object l,dba_objects o
where l.object_id=o.object_id;

查看被锁表的serial:

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;

kill 锁表session:

alter system kill session ‘sid,serial#;

 

  

 

oracle 锁表查看与解锁

标签:logo   serial   查看   session   objects   color   log   oracle 锁   alter   

原文地址:http://www.cnblogs.com/Springmoon-venn/p/6935001.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!