Performance monitoring with AWR
AWR is a powerful tool to capture the database usage during a particular window.Generate snapshots before and after load
Suppose you are going to perform a load test and you are interested in viewing the database statistics during the test, you will need to generate 2 snapshots:EXECUTE DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
Mark the timestamps as you will need them later on to identify the snapshots. To list all snapshots:
select snap_id, END_INTERVAL_TIME from dba_hist_snapshot order by snap_id;
Suppose I'm interested in the stats between 0100 and 0133, snap_id 6703 and 6706 are the ones I need
6703 26-MAY-11 01.00.55.656 AM 6704 26-MAY-11 01.16.26.786 AM 6705 26-MAY-11 01.29.40.026 AM 6706 26-MAY-11 01.33.54.024 AM
Next step, invoke an interactive program which comes with oracle to generate the report.
sqlplus / as sysdba @/u01/oracle/product/10.2.0/db_1/rdbms/admin/awrrpt.sql ... Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap: 6703 Begin Snapshot Id specified: 6703 Enter value for end_snap: 6706 End Snapshot Id specified: 6706 Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is awrrpt_1_6703_6706.html. To use this name, press <return> to continue, otherwise enter an alternative. Enter value for report_name: Using the report name awrrpt_1_6703_6706.html
There are no comments on this page. [Add comment]