AWR Generator
-------------
-- query snapid
SELECT dbid,
instance_number,
MIN (snap_id) begin_snap_id,
MAX (snap_id) end_snap_id
FROM dba_hist_snapshot
WHERE end_interval_time >=
to_date(‘2014/06/29 07:00:00‘, ‘yyyy/mm/dd hh24:mi:ss‘)
and end_interval_time <=
to_date(‘2014/06/29 08:01:00‘, ‘yyyy/mm/dd hh24:mi:ss‘)
GROUP BY dbid, instance_number;
--AWR Report
SELECT output FROM table (DBMS_WORKLOAD_REPOSITORY.awr_report_html(1781576951, 1, 24737, 24738, 0));
------------------------------------------------
时间: 2024-10-07 16:08:18