运行sqlplus,进入系统
如:sqlplus sys/pwd@dbname as sysdba;
...
SQL> @?\RDBMS\ADMIN\awrrpt.sql;
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
4240648358 SAP2HQ 1 sap2hq
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 -- 指定输出文件类型格式
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 4240648358 1 SAP2HQ sap2hq SERVER3-E982
B1E
Using 4240648358 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:1 -- 输入快照的天数
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
sap2hq SAP2HQ 840 14 Nov 2012 00:28 1
841 14 Nov 2012 02:00 1
842 14 Nov 2012 03:00 1
843 14 Nov 2012 04:00 1
844 14 Nov 2012 05:00 1
845 14 Nov 2012 06:00 1
846 14 Nov 2012 07:00 1
847 14 Nov 2012 08:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 840 -- 输入开始snap
Enter value for end_snap: 844 -- 输入结束snap
End Snapshot Id specified: 844
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_840_844.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:c:\awr-840-844.html -- 输入报告文件名