AWR报告对于性能分析至关重要,学习他的生成与查看,分析也很有必要!
当然有使用oracle工具的生成方法,很简单明了,如:toad
database-monitor-ADDM/AWR report
我们也可以直接用命令生成:
首先进入
[oracle@oracle admin]$ cd /u01/oracle/rdbms/admin[oracle@oracle admin]$ cd /
[oracle@oracle /]$ cd /u01/oracle/rdbms/admin
[oracle@oracle admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 16 17:09:04 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @awrrpt
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1579497439 ORACLE 1 oracle
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'
Type Specified: text
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1579497439 1 ORACLE oracle oracle
Using 1579497439 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.
Enter value for num_days: 11
Listing the last 11 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
oracle ORACLE 284 10 Jan 2011 15:01 1
285 10 Jan 2011 16:26 1
286 10 Jan 2011 17:00 1
287 11 Jan 2011 15:24 1
288 11 Jan 2011 16:00 1
289 11 Jan 2011 17:00 1
290 11 Jan 2011 20:50 1
291 13 Jan 2011 23:49 1
292 14 Jan 2011 13:59 1
293 14 Jan 2011 15:00 1
294 14 Jan 2011 16:00 1
295 14 Jan 2011 17:00 1
296 16 Jan 2011 10:58 1
297 16 Jan 2011 12:00 1
298 16 Jan 2011 13:00 1
299 16 Jan 2011 14:00 1
300 16 Jan 2011 15:00 1
301 16 Jan 2011 16:00 1
302 16 Jan 2011 17:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 287
Begin Snapshot Id specified: 287
Enter value for end_snap: 289
当然也可以选择HTML的方式。
生成的报告保存在/u01/oracle/rdbms/admin下