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

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

Error:

SQL> exec dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 10080);
BEGIN dbms_workload_repository.modify_snapshot_settings (interval => 30, 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 215
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 263
ORA-06512: at line 1

Cause:
Error says window baseline size 691200 seconds = 8 days(60*60*24*8) is greater than retention 604800 seconds= 7 days(60*60*24*7). We need to equal the window baseline and retention.

Solution:
To avoid error, make window baseline and retention equal.
Use calculation of days:
NOTE- 8 Days = 8*24*60 = 11520 minutes
7 DAYS = 7*24*60= 10080 minutes
6 DAYS = 6*24*60 = 8640 minutes

1. Check the Window Size.

SQL> select BASELINE_TYPE,MOVING_WINDOW_SIZE from dba_hist_baseline;
BASELINE_TYPE MOVING_WINDOW_SIZE
------------- ------------------
MOVING_WINDOW 8

2. Change the Window size to equal to retention of 7 days(604800 sec).

SQL> execute dbms_workload_repository.modify_baseline_window_size(window_size=> 7);
PL/SQL procedure successfully completed.

3. Now execute the statement again.

SQL> exec dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 10080);
PL/SQL procedure successfully completed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.