AWR oracle
短信预约 -IT技能 免费直播动态提醒
SELECT dbid, baseline_name, baseline_type, moving_window_size from dba_hist_baseline;
DBID BASELINE_NAME BASELINE_TYPE MOVING_WINDOW_SIZE
---------- ---------------------------------------------------------------- ------------- ------------------
536511065 SYSTEM_MOVING_WINDOW MOVING_WINDOW 8
begin
dbms_workload_repository.modify_snapshot_settings(interval=>60,retention=>90*24*60);
end;
col RETENTION for a20
select * from dba_hist_wr_control;
DBID SNAP_INTERVAL RETENTION TOPNSQL
---------- --------------------------------------------------------------------------- -------------------- ----------
536511065 +00000 01:00:00.0 +00090 00:00:00.0 DEFAULT
select snap_id,
to_char(begin_interval_time, 'YYYY-MM-DD'),
to_char(end_interval_time, 'YYYY-MM-DD')
from dba_hist_snapshot
order by snap_id;
手动生成AWR:
exec dbms_workload_repository.create_snapshot();
AWR数据存在sysaux表空间中
SQL> select OCCUPANT_NAME,OCCUPANT_DESC,SCHEMA_NAME,SPACE_USAGE_KBYTES/1024 "MB" from V$SYSAUX_OCCUPANTS WHERE OCCUPANT_NAME LIKE '%AWR%';
OCCUPANT_NAME OCCUPANT_DESC SCHEMA_NAME MB
-------------------- ------------------------------------------------------------ --------------- ----------
SM/AWR Server Manageability - Automatic Workload Repository SYS 216.81
SQL> select TABLE_NAME,PARTITION_NAME,TABLESPACE_NAME from dba_tab_partitions where table_name like 'WR%' and rownum <5;
TABLE_NAME PARTITION_NAME TABLESPACE_NAME
------------------------------ ------------------------------ ------------------------------
WRH$_ACTIVE_SESSION_HISTORY WRH$_ACTIVE_536511065_0 SYSAUX
WRH$_ACTIVE_SESSION_HISTORY WRH$_ACTIVE_SES_MXDB_MXSN SYSAUX
WRH$_DB_CACHE_ADVICE WRH$_DB_CACHE_AD_MXDB_MXSN SYSAUX
WRH$_DB_CACHE_ADVICE WRH$_DB_CAC_536511065_0 SYSAUX
awrddrpt.sql可以得到不同时间段的对比数据:
spawrrac.sql可以得到RAC 不同节点的数据对比分析
awrinfo.sql awr使用信息报告
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341