1. AWR基本操作
C:\>sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 5月 25 08:20:25 2011
Copyright (c) 1982, , . All rights reserved.
连接到:
Oracle Database Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Mining Scoring Engine options
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
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 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 断开
再来一次:
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值: 214
Begin Snapshot Id specified: 214
输入 end_snap 的值: 215
End Snapshot Id specified: 215
随后输入要生成的report名称 ....
......
End of Report