1. 程式人生 > >【oracle效能】11g生成ASH報告

【oracle效能】11g生成ASH報告

oracle 11g生成ASH報告

ASH以V$SESSION為基礎,每秒取樣一次,記錄活動會話等待的事件。不活動的會話不會取樣,取樣工作由新引入的後臺程序MMNL來完成。ASH buffers 的最小值為1MB,最大值不超過30MB.記憶體中記錄資料。期望值是記錄一小時的內容。

資料庫版本:11.2.0.4;系統版本:Oracle Linux6.4

SQL> @$ORACLE_HOME/rdbms/admin/ashrpt.sql        #回車
...
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type:            #報表輸出型別,預設為html,直接回車


...
Specify the timeframe to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter begin time for report:

--    Valid input formats:
--      To specify absolute begin time:
--        [MM/DD[/YY]] HH24:MI[:SS]
--        Examples: 02/23/03 14:30:15
--                  02/23 14:30:15
--                  14:30:15
--                  14:30
--      To specify relative begin time: (start with '-' sign)
--        -[HH24:]MI
--        Examples: -1:15  (SYSDATE - 1 Hr 15 Mins)
--                  -25    (SYSDATE - 25 Mins)

Defaults to -15 mins
Enter value for begin_time:         
#開始時間,預設為15分鐘前,可直接回車,如果需要30分鐘前,輸入-30
。。。
Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Press Enter to analyze till current time
Enter value for duration:         #收集多長時間,預設到當前時間


。。。
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is ashrpt_1_1111_1626.html.  To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:            #報告名稱,預設即可,會包含有時間
。。。
End of Report
</body></html>
Report written to ashrpt_1_1111_1626.html        
#生成報告,報告所在位置為當前位置,退出即可看到
SQL> exit