xzh2000的博客 本人提供杭州地区Oracle现场技术支持服务,包括性能调整、DataGuard、RAC等。
07 11, 2006
关于v$session_wait_history
作者 xzh2000 12:15 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 技术交流

V$SESSION_WAIT_HISTORY displays the last 10 wait events for each active session,这是10gR2中reference对该动态性能视的介绍,从该动态性能视图中追溯活动会话最后10个等待事件,如果我们想追溯活动会话更多的等待事件,那该如何实现呢?


SQL> set pages 9999
SQL> set lines 121
SQL> col ksppinm format a36
SQL> col ksppstvl format a18
SQL> col ksppdesc format a54
SQL> select ksppinm, ksppstvl, ksppdesc
2 from x$ksppi pi, x$ksppcv cv
3 where cv.indx=pi.indx and pi.ksppinm like '_%' escape ''
4 and pi.ksppinm like '%&parameter%';
Enter value for parameter: session_wait_history
old 4: and pi.ksppinm like '%&parameter%'
new 4: and pi.ksppinm like '%session_wait_history%'
KSPPINM KSPPSTVL KSPPDESC
------------------- ------- ------------------------------
_session_wait_history 10 enable session wait history collection

SQL> alter system set "_session_wait_history"=100 scope=spfile;
如果想追溯活动会话多于10的等待事件,这个需要修改隐藏参数_session_wait_history来实现,修改之后,需要重启实例,然后就可以保留活动会话的最后100个等待事件啦。

Comments
博客日历
« 七月 2009 »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
搜索
最新发表
文章分类
文章归档
网站链接
新闻聚合