• oracle死锁查询


    select sess.sid ||','||   
        sess.serial#,  
        lo.oracle_username,   
        lo.os_user_name,   
        ao.object_name,   
        lo.locked_mode,  
            SESS.machine  
        from v$locked_object lo,   
        dba_objects ao,   
        v$session sess   
    where ao.object_id = lo.object_id and lo.session_id = sess.sid ;  
    

    解决ORA-00054: resource busy and acquire with NOWAIT specified or timeout expire

    -- 查询有锁的sid
    select t2.username,t2.sid,t2.serial#,t2.logon_time
    from v$locked_object t1,v$session t2
    where t1.session_id=t2.sid order by t2.logon_time;
    
    -- 替换什么的sid查询具有sql  例子sid为2149
    select sql_text from v$session a,v$sqltext_with_newlines b
     where DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_value
     and a.sid=2149 order by piece;
     
     --kill该事务 例子 sid为339,serial#为13545
     alter system kill session '339,13545';
    
    
  • 相关阅读:
    03-19总结
    JS-DOM
    难题汇总,浮动,伪元素(行级),
    bug汇总
    两栏布局
    表单 form
    a 、ul、 table 标签
    Bootstrap的基本使用(css、js文件的引入)
    6. CSS样式
    5 CSS
  • 原文地址:https://www.cnblogs.com/fly-book/p/11444703.html
Copyright © 2020-2023  润新知