• 杀掉锁表进程


    -------查询锁表的所有进程
    select a.OS_USER_NAME, c.owner, c.object_name, b.sid, b.serial#, logon_time
    from v$locked_object a, v$session b, dba_objects c
    where a.session_id = b.sid
    and a.object_id = c.object_id
    order by b.logon_time;
     
    -------杀掉单个的进程 sid,serial#
    alter system kill session '210,11562';
     
    -------杀掉所有的进程
    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;
     
    -------手动杀进程:点击Oracle 的菜单栏“工具-会话”,查看进程列,右键点击关闭,可以杀掉进程。
  • 相关阅读:
    linksys wrt160nv3 刷dd-wrt固件
    win2008 r2 远程桌面问题
    windows server 2008 集成raid卡驱动
    gitlab-ce
    git
    批量发布jar包springboot应用
    gradle
    lvs
    rsyslog
    特殊权限
  • 原文地址:https://www.cnblogs.com/suhuaying/p/10569705.html
Copyright © 2020-2023  润新知