@?/rdbms/admin/ashrpt.sql 1. 你是一路回车,就是获取最近15分钟的ASH报表。 2. 你根据oldest ash sample available 时间,然后回车,选择的是目前可以收集到的最长ASH运行情况 3. 你可以选择Oldest ASH sample available和Latest ASH sample available之间时间,然后输入时长,比如30表示30分钟,取你要取的任何时段的ASH报表ASH报表也可以直接手工获取,比如select output from table(dbms_workload_repository.ash_report_html( dbid,inst_num,l_btime,l_etime);
示例: set pagesize 0 set linesize 121 spool d:\ash_rpt.html select output from table(dbms_workload_repository.ash_report_html( 977587123,1,SYSDATE-30/1440,SYSDATE-1/1440)); spool off --包详细参数: dbms_workload_repository.ash_report_html( l_dbid IN NUMBER, l_inst_num IN NUMBER, l_btime IN DATE, l_etime IN DATE, l_options IN NUMBER DEFAULT 0, l_slot_width IN NUMBER DEFAULT 0, l_sid IN NUMBER DEFAULT NULL, l_sql_id IN VARCHAR2 DEFAULT NULL, l_wait_class IN VARCHAR2 DEFAULT NULL, l_service_hash IN NUMBER DEFAULT NULL, l_module IN VARCHAR2 DEFAULT NULL, l_action IN VARCHAR2 DEFAULT NULL, l_client_id IN VARCHAR2 DEFAULT NULL, l_plsql_entry IN VARCHAR2 DEFAULT NULL)
[Oracle] - 性能优化工具(2) - ASH,布布扣,bubuko.com
原文地址:http://blog.csdn.net/dbanote/article/details/26835067