Error while changing AWR retention... Error: SQL> EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(RETENTION => 10080); BEGIN DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(RETENTION => 10080); END; * ERROR at line 1: ORA-13541: system moving window baseline size (691200) greater than retention (604800) ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 213 ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 265 ORA-06512: at line 1 Here, you are trying to modify the AWR retention to 7 days. i.e. 24 Hrs. x 60 Minutes x 7 Days = 10080 Minutes Cause: This is expected because you are trying to modify the AWR snapshot retention less than the moving window baseline size. Oracle 11g introduced a moving window baseline concept. This is useful when using adaptive thresholds, because the database can use AWR data in the entire AWR retention period to calculate the metric threshold values. Oracle Database automatically maintains a system-defined moving window baseline. The default window size for the system-defined moving window baseline is the current AWR retention period i.e. 8 days. You can resize the moving window baseline by changing the number of days in the moving window to a value that is equal to or less than the number of days in the AWR retention period. Therefore, to increase the size of a moving window, you must first increase the AWR retention period accordingly. You can not set the AWR retention period to less than moving window size. If you try to do it then, you will face the above error message. You have to change the AWR retention to greater than or equal to the moving window size to fix the above error. Solution: #Execute below query check existing moving window size. SQL> COL BASELINE_NAME FORMAT A22 SQL> SELECT DBID, BASELINE_NAME, BASELINE_TYPE, MOVING_WINDOW_SIZE FROM DBA_HIST_BASELINE WHERE BASELINE_NAME='SYSTEM_MOVING_WINDOW'; DBID BASELINE_NAME BASELINE_TYPE MOVING_WINDOW_SIZE ---------- ---------------------- ------------- ------------------ 2447257321 SYSTEM_MOVING_WINDOW MOVING_WINDOW 8 #Execute below query to modify AWR retention period to 8 days(24 x 60 x 8 = 11520) which is equal to moving window size. SQL> EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(RETENTION => 11520); PL/SQL procedure successfully completed. OR #You can also modify AWR retention period to greater than moving window size 10 days(24 x 60 x 10 = 14400) which is equal to moving window size. SQL> EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(RETENTION => 14400); PL/SQL procedure successfully completed. |
Thanks for reading this post ! Please comment if you like this post ! Click on FOLLOW to get future blog updates !
Thank you for your comment !