oracle查询哪些表被锁以及解锁
程序员文章站
2022-06-11 19:24:48
...
--查询被锁表的session_id
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;
--查询session_id和serial#
select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
--解锁,第一个参数session_id,第二个参数serial#
alter system kill session'1142,60225';
上一篇: 和年轻时力气一样大