SQL> @D:\oracle\product\10.2.0\db_2\RDBMS\ADMIN\awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3556425887 TEST01 1 test01
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'
输入 report_type 的值:
Type Specified: html或text
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 3556425887 1 TEST01 test01 PCE-TSG-036
Using 3556425887 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.
输入 num_days 的值: 2
Listing the last 2 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
test01 TEST01 214 24 5月 2011 07:53 1
215 24 5月 2011 09:00 1
216 24 5月 2011 10:01 1
217 24 5月 2011 11:00 1
218 24 5月 2011 12:00 1
219 24 5月 2011 13:01 1
220 24 5月 2011 14:00 1
221 24 5月 2011 15:00 1
222 24 5月 2011 16:00 1
223 24 5月 2011 17:00 1
-------- --这里有断点,说明这个时段数据库重启过,如果数据库重启过,横跨这个时段是不能分析的
224 25 5月 2011 07:51 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值: 223
Begin Snapshot Id specified: 223
输入 end_snap 的值: 224
End Snapshot Id specified: 224
declare
*
第 1 行出现错误:
ORA-20200: The instance was shutdown between snapshots 223 and 224
ORA-06512: 在 line 42
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining Scoring Engine options 断开
再试一次,不要选择中间有断点的起始snapshot id,如开始snapshot id可以用217,结束snapshot id可以为220.
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_929_951.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: --名称我们默认就可以了
或者指定放到某目录,比如:输入/tmp/awrrpt_1_929_951.html
回车
End of Report
< /BODY></HTML>
Report written to awrrpt_1_929_951.html