Fix Error: ORA-13541: system moving window baseline size (691200) greater than retention (259200)

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World

Problem Description:

When I trying to change the AWR snapshot setting I am getting below error. 

Error: ORA-13541: system moving window baseline size (691200) greater than retention (259200)

SQL> get afiedt.buf
  1  DECLARE
  2    retention_num NUMBER;
  3    interval_num NUMBER;
  4  BEGIN
  5    -- Set the desired snapshot retention period (in days)
  6    retention_num := 3*24*60;
  7    -- Set the desired snapshot interval (in minutes)
  8    interval_num := 60;
  9    -- Modify the snapshot settings
 10    DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
 11	 retention => retention_num,
 12	 interval => interval_num
 13    );
 14    -- Commit the changes
 15    COMMIT;
 16    DBMS_OUTPUT.PUT_LINE('AWR Snapshot Settings Modified Successfully');
 17  EXCEPTION
 18    WHEN OTHERS THEN
 19	 DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
 20	 ROLLBACK;
 21* END;
SQL> /
Error: ORA-13541: system moving window baseline size (691200) greater than retention (259200)

PL/SQL procedure successfully completed.

Solution Description:


Check your database MOVING_WINDOW_SIZE value from dba_hist_baseline table using below query. 

advertisements
 

SQL>  select BASELINE_TYPE,MOVING_WINDOW_SIZE from dba_hist_baseline;

BASELINE_TYPE MOVING_WINDOW_SIZE
------------- ------------------
MOVING_WINDOW		       8

You should match the value of retention to that.

  1  DECLARE
  2    retention_num NUMBER;
  3    interval_num NUMBER;
  4  BEGIN
  5    -- Set the desired snapshot retention period (in days)
  6    retention_num := 8*24*60;
  7    -- Set the desired snapshot interval (in minutes)
  8    interval_num := 60;
  9    -- Modify the snapshot settings
 10    DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
 11	 retention => retention_num,
 12	 interval => interval_num
 13    );
 14    -- Commit the changes
 15    COMMIT;
 16    DBMS_OUTPUT.PUT_LINE('AWR Snapshot Settings Modified Successfully');
 17  EXCEPTION
 18    WHEN OTHERS THEN
 19	 DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
 20	 ROLLBACK;
 21* END;
SQL> /
AWR Snapshot Settings Modified Successfully

PL/SQL procedure successfully completed.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer