AWR可以收集的信息有:
V$SESS_TIME_MODEL
and V$SYS_TIME_MODEL
views.V$ACTIVE_SESSION_HISTORY
view.V$SYSSTAT
and V$SESSTAT
views.sqlplus /nolog
conn system/xxx
(需使用sys/system用户来执行脚本)
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
参数1:
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type:
Type Specified: html
参数2:
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Enter value for num_days: 1
参数3:
Listing the last day's Completed Snapshots
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
mc3yd213 MC3YD213 4653 17 Dec 2012 00:00 1
4654 17 Dec 2012 01:00 1
4655 17 Dec 2012 02:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 4653
Begin Snapshot Id specified: 4653
Enter value for end_snap: 4654
End Snapshot Id specified: 4654
参数4:
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_4653_4654.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:xxx.html
Link
reference1:http://www.oracle-base.com/articles/10g/automatic-workload-repository-10g.php#reading-awr-reports
http://www.oracle-base.com/articles/10g/automatic-workload-repository-10g.php
Automatic Workload Repository (AWR) Reports - Start Point (Doc ID 1363422.1)
Assuming you have the appropriate licenses for AWR, you may gather and examine Automatic Workload Repository (AWR) reports for the system.
Without the appropriate licenses, Statspack provides a legacy solution:
This section covers the setup of AWR and troubleshooting of problems related to that:
AWR Setup