Oracle查看锁表并杀死进程

1、查看表是否被锁定

SELECT s.USERNAME,s.STATUS, object_name, machine, s.sid, s.serial# 
  from gv$locked_object i, dba_objects o, gv$session s
 where i.object_id = o.object_id
   and i.session_id = s.sid;

2、杀死进程

--alter system kill session 'sid, serial#'
alter system kill session '2838, 58765'; --(sid, srial#) 

 

posted @ 2018-01-03 16:58  膜拜曾文正  阅读(480)  评论(0编辑  收藏  举报