在AWR中,如果有部分选项是:Nodata exists for this section of the report.那么属正常现象。
在下面的这个图中就显示了显示的条件:
(1)SQL orderedby Sharable Memory:Only Statements with Sharable Memory greater than 1048576 are displayed
(2)SQL orderedby Version Count:Only Statements with Version Count greater than 20 are displayed
只有达到条件的情况下,才会显示该项的数据。所以如果出现No data exists for this section of the report.就说明还没达到条件。
如果说不是局部选项,而是全部都是No data exists for this section of the report,那么AWR的相关参数设置可能就有问题。
在Oracle 10g和11g 都有的参数:statistics_level,如果该参数设置为BASIC,那么会禁用如下功能:
(1) Automatic Workload Repository(AWR) Snapshots
(2) Automatic Database DiagnosticMonitor (ADDM)
(3) All server-generated alerts
(4) Automatic SGA Memory Management
(5) Automatic optimizer statisticscollection
(6) Object level statistics
(7) End to End Application Tracing(V$CLIENT_STATS)
(8) Database time distributionstatistics (V$SESS_TIME_MODEL and V$SYS_TIME_MODEL)
(9) Service level statistics
(10) Buffer cache advisory
(11) MTTR advisory
(12) Shared pool sizing advisory
(13) Segment level statistics
(14) PGA Target advisory
(15) Timed statistics
(16) Monitoring of statistics
该参数默认是typical:
SYS> show parameter statistics
NAME TYPE VALUE
----------------------------------------------- ------------------------------
statistics_level string TYPICAL
timed_os_statistics integer 0
timed_statistics boolean TRUE
使用如下SQL 查看相关的设置:
/* Formatted on 2011/12/1610:30:17 (QP5 v5.185.11230.41888) */
SELECTstatistics_name,
session_status,
system_status,
activation_level,
session_settable
FROM v$statistics_level
ORDER BY statistics_name;
在Oracle 11g 下,多了一个CONTROL_MANAGEMENT_PACK_ACCESS参数,该参数可以影响AWR信息的收集:
SQL> show parameter CONTROL_MANAGEMENT_PACK_ACCESS
NAME TYPE VALUE
----------------------------------------------- ----------------------
control_management_pack_access string DIAGNOSTIC+TUNING
Enterprise Edition: DIAGNOSTIC+TUNING
All other editions: NONE
Modifiable
ALTER SYSTEM
Basic
No
CONTROL_MANAGEMENT_PACK_ACCESS specifieswhich of the Server Manageability Packs should be active. The following packsare available:
The DIAGNOSTIC pack includes AWR, ADDM, and so on.
The TUNING pack includes SQL Tuning Advisor, SQLAccess Advisor, and so on.
A license for DIAGNOSTIC is required for enabling the TUNING pack.
如果在Oracle 11g里该参数不正确,也会影响AWR等信息的收集,可以通过如下语句修改:
SQL>alter system set control_management_pack_access='DIAGNOSTIC+TUNING' scope=both;
System altered.
小结:
1. 如果部分选项出现No data exists for this section of the report.属正常现象。
2. 如果全部出现,则需要检查相关参数10g中检查statistics_level,11g中检查statistics_level和control_management_pack_access参数。