ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查看过去的session锁情况脚本

查看过去的session锁情况脚本

原创 Linux操作系统 作者:yezhibin 时间:2010-01-22 16:54:11 0 删除 编辑
 select filter from t1 where rownum=1 for update;
 
 select FILTER from t1 where FILTER=6 for update;
 
break on MY_TIME
column my_sid format 999
column my_ser format 99999
column my_state format a30
column my_blkr format 999
select to_char(a.sample_time, 'HH24:MI:SS') MY_TIME,a.session_id MY_SID,a.session_serial# MY_SER,
        DECODE(a.session_state, 'WAITING' ,a.event, a.session_state) MY_STATE,a.xid, a.sql_id,
        a.blocking_session MY_BLKR
from v$active_session_history a, dba_users u
where u.user_id = a.user_id
and u.username = 'PERFSTAT'
and a.sample_time > SYSTIMESTAMP-(2/1440);

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/354732/viewspace-625799/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: X$BH笔记<一>
请登录后发表评论 登录
全部评论

注册时间:2008-12-18

  • 博文量
    159
  • 访问量
    559688