Friday, September 23, 2011

How to generate AWR Report?

Method 1:  By Querying

1. Query dba_hist_snapshot to find the snap id for the interval you are looking for.

SELECT dbid, snap_id, begin_interval_time, end_interval_time from dba_hist_snapshot
order by begin_interval_time;

2.

spool siv_awr_201109.lst
SELECT output
FROM TABLE (dbms_workload_repository.awr_report_text(3463084831, 1, 18048, 18050));
spool off

Method 2:

@?/rdbms/admin/awrrpt.sql

It is an interactive script that can be used to generate HTML or text reports. The script prompts for type of report
requested and prompts for number of days of snapshots to choose from so based on that it displays snap ids to
choose the start and end snapshot it.

@?/rdbms/admin/awrrpti.sql

Script can be used for the specified database and instance so the script in addition will prompt for dbid and instance number.
@?/rdbms/admin/awrddrpt.sql Script can be used to generate a combine report of 2 different snapshots for comparison of performance in one report so it will prompt for two pairs of snapshot snapshots to compare against.
@?/rdbms/admin/awrinfo.sql Script print AWR information like space usage by AWR, subset of AWR snap ids, Automatic Database Diagnostic Monitor (ADDM), Active Session History (ASH) information.

No comments: