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:
專注于為中小企業(yè)提供網(wǎng)站設計、做網(wǎng)站服務,電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)瑞昌免費做網(wǎng)站提供優(yōu)質的服務。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了近千家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設實現(xiàn)規(guī)模擴充和轉變。
exec dbms_workload_repository.create_snapshot();
AWR數(shù)據(jù)存在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可以得到不同時間段的對比數(shù)據(jù):
spawrrac.sql可以得到RAC 不同節(jié)點的數(shù)據(jù)對比分析
awrinfo.sql awr使用信息報告