轉 ORA-13541: system moving window baseline size (691200) greater than retention (432000)

修改awr生成報告時間間隔和保存時間時報錯,由默認的每小時生成,保存8天修改成每半個小時生成一次,保存5天:html

複製代碼
SQL>  exec dbms_workload_repository.modify_snapshot_settings(interval=>30, retention=>5*24*60);
BEGIN dbms_workload_repository.modify_snapshot_settings(interval=>30, retention=>5*24*60); END;
*
ERROR at line 1:
ORA-13541: system moving window baseline size (691200) greater than retention (432000)
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 174
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 222
ORA-06512: at line 1
複製代碼

  根據報錯,系統的window baseline size大於了設定的窗口基線大小。post

  查看系統基線的由來:spa

複製代碼
SQL> col SNAP_INTERVAL for a25
SQL> col RETENTION for a25
SQL> select * from dba_hist_wr_control;

      DBID SNAP_INTERVAL             RETENTION                 TOPNSQL
---------- ------------------------- ------------------------- ----------
1466421350 +00000 01:00:00.0         +00008 00:00:00.0         DEFAULT

SQL> select 691200/60/60/24 from dual;

691200/60/60/24
---------------
              8
SQL> select 432000/60/24/60 from dual;

432000/60/24/60
---------------
              5
複製代碼

  能夠看到保存8天的基線是691200,而保存5天的基線是432000,剛纔的報錯是說系統的基線大於了要設定的基線,所以這裏須要將系統的基線改小:code

SQL> exec dbms_workload_repository.modify_baseline_window_size(5);

PL/SQL procedure successfully completed.

  而後再修改awr快照配置,能夠看到修改爲功:htm

SQL> exec dbms_workload_repository.modify_snapshot_settings(interval=>30, retention=>5*24*60);

PL/SQL procedure successfully completed.

  進行檢查:blog

SQL> select * from dba_hist_wr_control;

      DBID SNAP_INTERVAL             RETENTION                 TOPNSQL
---------- ------------------------- ------------------------- ----------
1466421350 +00000 00:30:00.0         +00005 00:00:00.0         DEFAULT

  檢查當前的移動窗口基線大小:get

SQL> col BASELINE_NAME for a25
SQL> SELECT dbid, baseline_name, baseline_type, moving_window_size from dba_hist_baseline;

      DBID BASELINE_NAME             BASELINE_TYPE MOVING_WINDOW_SIZE
---------- ------------------------- ------------- ------------------
1466421350 SYSTEM_MOVING_WINDOW      MOVING_WINDOW                  5

 https://www.cnblogs.com/zx3212/p/6802131.htmlit

 
 
標籤:  ORACLE
相關文章
相關標籤/搜索