oracle 表被锁定 杀死进程

/*查出被锁biao*/
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;
/*查出锁定表的sid, serial#,*/
SELECT s.sid, s.serial#, s.username, s.schemaname, s.osuser, s.process, s.machine,
s.terminal, s.logon_time, l.type
FROM v$session s, v$lock l
WHERE s.sid = l.sid
AND s.username IS NOT NULL
ORDER BY sid;
/*杀掉进程 sid,serial#*/ 
alter system kill session'sid,serial';

 

posted on 2017-01-05 18:30  ckx0709  阅读(152)  评论(0编辑  收藏  举报

导航