(1)在PLSQL Developer查询以下内容(时间范围可根据实际情况进行替换)
select snap_id,
dbid,
instance_number,
to_char(end_interval_time, 'YYYY-MM-DD HH24:MI:SS')
from dba_hist_snapshot
where end_interval_time >=
to_date('2022-12-1 09:00:00', 'yyyy-mm-dd hh24:mi:ss')
and end_interval_time <=
to_date('2022-12-1 18:01:00', 'yyyy-mm-dd hh24:mi:ss')
order by end_interval_time;
产生awr 报告任务(将上述命令中查询的4个值替换下面的参数)
select output
from table(dbms_workload_repository.awr_report_html(2879679614,
1,
3584,
3591));
(3)将查询结果另存为html 用浏览器打开即可;