Wednesday, August 18, 2010

Generate AWR Report From Client

If you have no access to the database server, you can still generate AWR reports using the PL/SQL interface.


-- find snap_id's
select *
from dba_hist_snapshot
order by end_interval_time desc
;

-- run the report
select output
from table(dbms_workload_repository.awr_report_text( (select dbid from v$database), 1, 25162, 25163 ))
;
select output
from table(dbms_workload_repository.awr_report_html( (select dbid from v$database), 1, 25162, 25163 ))
;

No comments: