|
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 '%¶meter%'; Enter value for parameter: session_wait_history old 4: and pi.ksppinm like '%¶meter%' 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个等待事件啦。
|