日期:2014-05-16  浏览次数:20376 次

ASH报告的产生--学习小结

                                                        ASH报告的产生


You can examine the current Active Session Hist ory (ASH) data in the  V$ACTIVE_SESSION_HISTORY view
and historical data in the   DBA_HIST_ACTIVE_SESS_HISTORY   view
 
 
  <1>V$ACTIVE_SESSION_HISTORY
  one  sample every 1 seconds
 
 
  <2>DBA_HIST_ACTIVE_SESS_HISTORY
  one  sample every 10 seconds
 
 查看当前活跃回话的ash data 信息
 
 select * from V$ACTIVE_SESSION_HISTORY;
 SAMPLE_ID SAMPLE_TIME
---------- ------------------------------

    430857 18-3月 -13 08.20.06.998 下午
    430782 18-3月 -13 08.18.51.965 下午
    430781 18-3月 -13 08.18.50.965 下午
    430780 18-3月 -13 08.18.49.969 下午
    430779 18-3月 -13 08.18.48.965 下午
    430778 18-3月 -13 08.18.47.965 下午
    430737 18-3月 -13 08.18.06.966 下午
    430734 18-3月 -13 08.18.03.967 下午
    430731 18-3月 -13 08.18.00.967 下午
    430728 18-3月 -13 08.17.57.967 下午
    430722 18-3月 -13 08.17.51.967 下午
 。。。。。
 
 
 查看ash data的历史信息:
SQL> select * from DBA_HIST_ACTIVE_SESS_HISTORY;

   SNAP_ID       DBID INSTANCE_NUMBER  SAMPLE_ID SAMPLE_TIME
---------- ---------- --------------- ---------- -------------------------------

       154 2546074315               1     407670 16-3月 -13 07.55.56.716 下午
       161 2546074315               1     422430 18-3月 -13 06.00.41.425 下午
       161 2546074315               1     425330 18-3月 -13 06.49.01.498 下午
       159 2546074315               1     419670 18-3月 -13 05.14.38.109 下午
       159 2546074315               1     419670 18-3月 -13 05.14.38.109 下午
       159 2546074315               1     419670 18-3月 -13 05.14.38.109 下午
       159 2546074315               1     419670 18-3月 -13 05.14.38.109 下午
       159 2546074315               1     419670 18-3月 -13 05.14.38.109 下午
       159 2546074315               1     419680 18-3月 -13 05.14.48.109 下午
       159 2546074315               1     419970 18-3月 -13 05.19.38.153 下午
       158 2546074315     &