oracle生成AWR报告

AWR 是通过对比两次快照(snapshot)收集到的统计信息,来生成报表数据,生成的报表包括多个部分。具体指标请百度。

例子:

脚本位置,$ORACLE_HOME/rdbms/admin/awrrpt.sql

$ sqlplus / as sysdba

SQL> @?/rdbms/admin/awrrpt.sql

Current Instance

~~~~~~~~~~~~~~~~

   DB Id    DB Name  Inst Num Instance

----------- ------------ -------- ------------

 3502159277 RACWANGP  1 racwangp1

 

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  ---html格式的报告

 

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: 1 ---最近一天

 

 

Instance     DB Name     Snap Id    Snap Started    Level

------------ ------------ --------- ------------------ -----

racwangp1    RACWANGP        4329 17 Jul 2019 00:00    1

          4330 17 Jul 2019 01:00    1

          4331 17 Jul 2019 02:00    1

          4332 17 Jul 2019 03:00    1

          4333 17 Jul 2019 04:00    1

          4334 17 Jul 2019 05:00    1

          4335 17 Jul 2019 06:00    1

          4336 17 Jul 2019 07:00    1

          4337 17 Jul 2019 08:00    1

          4338 17 Jul 2019 09:00    1

 

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap: 4329 ---起始snap id

Enter value for end_snap: 4338 ---结束snap id

Specify the Report Name

~~~~~~~~~~~~~~~~~~~~~~~

The default report file name is awrrpt_1_4329_4338.html.  To use this name,

press to continue, otherwise enter an alternative.

Enter value for report_name: awr_1907.html ---报告名

Back to Top

End of Report

Report written to awr_1907.html

SQL>

awr_1907.html保存在$ORACLE_HOME/rdbms/admin下,浏览器打开html,即可分析。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值