Oracle解锁
跳到导航
跳到搜索
conn /as sysdba
-- 被锁对象表、数据库对象表、数据session表关联来获取被锁对象对应的是那个session;
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
-- 杀掉锁表进程:
-- 通过上面的查询获取SID和serial#,替换下面的x,y,就可以解除被锁的状态
alter system kill session 'sess.sid, sess.serial#';