首页 > 代码库 > 数据库表解锁
数据库表解锁
1.查询表锁
SELECT a.sid,a.serial#,a.username,a.program,b.os_user_name,c.object_name FROM v$session a,v$locked_object b,dba_objects c where b.session_id = a.sid and c.object_id = b.object_id order by a.logon_time;2.解锁
alter system kill session‘1025,41‘; 其中1025为sid,41为serial#.
参考: 2014-12-19
select a.*, b.username,b.sid,b.serial#,c.object_name,logon_time from v$locked_object a,v$session b,dba_objects c where a.session_id = b.sid and c.object_id = a.object_id order by b.logon_time;
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;select b.username,b.sid,b.* from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
select a.*, b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b,dba_objects c where a.session_id = b.sid and c.object_id = a.object_id order by b.logon_time;
SELECT a.sid,a.serial#,a.username,a.program,b.os_user_name,c.object_name FROM v$session a,v$locked_object b,dba_objects c where b.session_id = a.sid and c.object_id = b.object_id order by a.logon_time;
select * from v$session;
select * from v$locked_object
alter system kill session‘720,9997‘;
数据库表解锁
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。