ORACLE批量杀死锁

declare cursor mycur is  
select b.sid,b.serial#  
  from v$locked_object a,v$session b  
  where a.session_id = b.sid group by b.sid,b.serial#;  
  
  
begin  
  for cur in mycur  
    loop    
     execute immediate ( 'alter system  kill session  '''||cur.sid || ','|| cur.SERIAL# ||''' ');  
     end loop;  
  
end; 

阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭