• oracle锁表


    查看被锁表信息

    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;
    

    解锁

    alter system kill session '23,44220';
    

    查看数据库引起锁表的SQL语句

    SELECT A.USERNAME,
           A.MACHINE,
           A.PROGRAM,
           A.SID,
           A.SERIAL#,
           A.STATUS,
           C.PIECE,
           C.SQL_TEXT
      FROM V$SESSION A, V$SQLTEXT C
     WHERE A.SID IN (SELECT DISTINCT T2.SID
                       FROM V$LOCKED_OBJECT T1, V$SESSION T2
                      WHERE T1.SESSION_ID = T2.SID)
       AND A.SQL_ADDRESS = C.ADDRESS(+)
     ORDER BY C.PIECE;
    
    -------------------------------------------------------------------------
    ## 极客时间全网最便宜最优惠购买方式,优惠券返现 百度网盘 微信关注公众号“选门好课”
    扫描下方二维码关注我的公众号"选门好课",与我一起交流知识
  • 相关阅读:
    [FJWC2018]全排列
    CYJian的新春虐题赛
    C. 新年的繁荣
    CF809E Surprise me!
    codeforces 1110F
    C. mathematican 的二进制
    [SPOJ] DIVCNT2
    CF1065F Up and Down the Tree
    Snakes 的 Naïve Graph
    「LibreOJ Round #9」CommonAnts 的调和数
  • 原文地址:https://www.cnblogs.com/singworld/p/14714225.html
Copyright © 2020-2023  润新知