Generating AWR Reports
Submitted by dave on Wed, 04/27/2011 - 16:26
Permissions
Of course DBAs can execute these procs and have permissions to generate reports. If you have a user that you trust to run AWR reports you can grant them SELECT_CATALOG_ROLE and
grant select_catalog_role to &user.; grant execute on dbms_workload_repository to &user.;
AWR Reports
dbms_workload_repository.awr_report_text()
dbms_workload_repository.awr_report_html()
AWR Difference Report
A useful difference report between two AWR reports can be generated by running awrddrpt.sql or by using the API.
If you run awrddrpt.sql then you will be prompted for all required information for the two snapshots you want to compare.
Using the API:
select output from table(dbms_workload_repository.awr_diff_report_html( :dbid1, :inst_num, :bid, :eid, :dbid2, :inst_num2, :bid2, :eid2 ));