AWR (Automatic Workload Repository) Report

10g引入AWR(Automatic Workload Repository),一个新的性能采集和分析工具。 (10g以前使用statspack)

AWR可以收集的信息有:

  • Wait events used to identify performance problems.
  • Time model statistics indicating the amount of DB time associated with a process from the V$SESS_TIME_MODEL and V$SYS_TIME_MODEL views.
  • Active Session History (ASH) statistics from the V$ACTIVE_SESSION_HISTORY view.
  • Some system and session statistics from the V$SYSSTAT and V$SESSTAT views.
  • Object usage statistics.
  • Resource intensive SQL statements.
AWR使用快照(Snapshots)的概念来设定性能收集的范围。快照(Snapshots),在特定时间捕获的一组性能统计信息,用于计算统计信息的更改率。每个快照由snap_id进行标识。默认快照每60分钟生成一次,并且这个会保留7天。


如何生成AWR Report

sqlplus /nolog
conn system/xxx

(需使用sys/system用户来执行脚本)
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
参数1:

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:

Type Specified: html

参数2:

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.


Enter value for num_days: 1

参数3:

Listing the last day's Completed Snapshots

Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
mc3yd213 MC3YD213 4653 17 Dec 2012 00:00 1
4654 17 Dec 2012 01:00 1
4655 17 Dec 2012 02:00 1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 4653
Begin Snapshot Id specified: 4653

Enter value for end_snap: 4654
End Snapshot Id specified: 4654


参数4:

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

Enter value for report_name:xxx.html



AWR Report Demo

Link


How to Read AWR report

reference1:http://www.oracle-base.com/articles/10g/automatic-workload-repository-10g.php#reading-awr-reports


Reference

http://www.oracle-base.com/articles/10g/automatic-workload-repository-10g.php

Automatic Workload Repository (AWR) Reports - Start Point (Doc ID 1363422.1)


AWR Overview
Document 276103.1 PERFORMANCE TUNING USING 10g ADVISORS AND MANAGEABILITY FEATURES

Assuming you have the appropriate licenses for AWR, you may gather and examine Automatic Workload Repository (AWR) reports for the system.

Document 1490798.1 AWR Reporting - Licensing Requirements Clarification

Without the appropriate licenses, Statspack provides a legacy solution:

Document 94224.1 FAQ- Statspack Complete Reference
Collecting AWR reports
Document 748642.1 How to Generate an AWR Report and Create Baselines
AWR Interpretation
Document 1359094.1 FAQ: How to Use AWR reports to Diagnose Database Performance Issues
Document 786554.1 How to Read PGA Memory Advisory Section in AWR and Statspack Reports
Document 754639.1 How to Read Buffer Cache Advisory Section in AWR and Statspack Reports.
Document 762526.1 How to Interpret the OS stats section of an AWR report
Document 1466035.1 How to Interpret the "SQL ordered by Physical Reads (UnOptimized)" Section in AWR Reports (11.2 onwards)
AWR setup and Troubleshooting setup Issues

This section covers the setup of AWR and troubleshooting of problems related to that:

AWR Setup
Document 782974.1 How to Recreate The AWR ( AUTOMATIC WORKLOAD ) Repository ?
AWR Troubleshooting
Document 1301503.1 Troubleshooting: AWR Snapshot Collection issues
Document 296765.1 Solutions for possible AWR Library Cache Latch Contention Issues in Oracle 10g
Document 560204.1 MMON TRACE SHOWS KEWRAFC: FLUSH SLAVE FAILED, AWR ENQUEUE TIMEOUT
AWR Storage Management
Document 287679.1 Space Management In Sysaux Tablespace with AWR in Use
Document 329984.1 Usage and Storage Management of SYSAUX tablespace occupants SM/AWR, SM/ADVISOR, SM/OPTSTAT and SM/OTHER
Common Issues
Document 459887.1 ORA-13516 AWR Operation failed: SWRF Schema not initialized ORA-06512 SYS.DBMS_WORKLOAD_REPOSITORY
If awrinfo.sql hangs, use following script:
Document 733655.1 AWR diagnostic collection script

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值