How to generate an AWR report.
1. $ export ORACLE_SID=batch005
2. $ echo $ORACLE_SID
3. $ sqlplus / as sysdba
4. sql> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
853510723 BATCH005 1 batch005
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: html
Type Specified: html
EXT
-----
.html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 853510723 1 BATCH005 batch005 XXX.com
Using 853510723 for database Id
Using 1 for instance number
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: 2 # show latest 2-days snapshot
Listing the last 2 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
batch005 BATCH005 7681 09 Jun 2015 00:00 1
7682 09 Jun 2015 01:00 1
7683 09 Jun 2015 02:00 1
7684 09 Jun 2015 03:01 1
7685 09 Jun 2015 04:00 1
7686 09 Jun 2015 05:00 1
7687 09 Jun 2015 06:00 1
7688 09 Jun 2015 07:00 1
7689 09 Jun 2015 08:00 1
7690 09 Jun 2015 09:00 1
7691 09 Jun 2015 10:00 1
7692 09 Jun 2015 11:00 1
7693 09 Jun 2015 12:00 1
7694 09 Jun 2015 13:00 1
7695 09 Jun 2015 14:00 1
7696 09 Jun 2015 15:00 1
7697 09 Jun 2015 16:00 1
7698 09 Jun 2015 17:00 1
7699 09 Jun 2015 18:01 1
7700 09 Jun 2015 19:00 1
7701 09 Jun 2015 20:00 1
7702 09 Jun 2015 21:00 1
7703 09 Jun 2015 22:00 1
7704 09 Jun 2015 23:00 1
7705 10 Jun 2015 00:00 1
7706 10 Jun 2015 01:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 7705 #show the last snapshot
Begin Snapshot Id specified: 7705
Enter value for end_snap: 7706 #show the last snapshot
End Snapshot Id specified: 7706
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_7705_7706.html. To use this name,
press <return> to continue,otherwise enter an alternative.
Enter value for report_name:
Using the report name awrrpt_1_7705_7706.html
sql> quit
Here,AWR report awrrpt_1_7705_7706.html is generated.
Next step: How to read an AWR report ?
Refer to: http://oraclewindow.blogspot.jp/2013/05/how-to-read-awr-reports.html
原文链接:https://www.f2er.com/oracle/212207.html