生成AWR性能报告!

本文介绍如何在Oracle10g环境下使用AWR工具生成性能分析报告,包括设置报告类型、选择性能快照时间范围及指定报告名称等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Oracle 10g 下新增了一个性能采样工具,AWR(Automatic Workload Repository),它比statspack收集的信息更多,使用起来更方便。AWR由运行在Oracle的后台进程自动、定期收集数据库的性能数据,并将数据保存起来,每一个小时,AWR都会生成一次性能数据快照,不需要认为干预,我们要做的就是使用这些信息,生成一个AWR的性能分析报告。


[oracle@linux db_1]$ sqlplus / as sysdba @?/rdbms/admin/awrrpt.sql

SQL*Plus: Release 10.2.0.4.0 - Production on 星期五 11月 4 10:46:22 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


连接到: 
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 1290103567 ORCL                1 orcl


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 的值:  html     --这里是生成html格式的awr报告。

Type Specified:  html


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     Inst Num DB Name      Instance     Host
------------ -------- ------------ ------------ ------------
* 1290103567        1 ORCL         orcl         linux

Using 1290103567 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 的值:  1   --显示最近1天的性能收集信息。

Listing the last day's Completed Snapshots

                                                        Snap
Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
orcl         ORCL                13 07 10月 2011 12:07     1
                                 14 07 10月 2011 13:00     1
                                 15 07 10月 2011 14:01     1
                                 16 07 10月 2011 15:00     1
                                 17 07 10月 2011 16:00     1
                                 18 07 10月 2011 17:00     1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值:  17
Begin Snapshot Id specified: 17   --开始快照号是17。

输入 end_snap 的值:  18
End   Snapshot Id specified: 18   --结束快照号是18。



Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_17_18.html.  To use this name,
press <return> to continue, otherwise enter an alternative.

输入 report_name 的值:  /u01/app/oracle/awr.html    --生成awr报告的路径和名字。

using ...
... ...
... ...
... ...
Report written to /u01/app/oracle/awrr.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值