ORA-13510: invalid RETENTION 7, must be in the range (1440, 52560000)

Cause:

Retention value should be in seconds unit

kIsH@Xhydra<>EXEC DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(interval => 60, retention => 7);
BEGIN DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(interval => 60, retention => 7); END;

*
ERROR at line 1:
ORA-13510: invalid RETENTION 7, must be in the range (1440, 52560000)
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 213
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 265
ORA-06512: at line 1

Action:

Convert the 8 days to seconds

kIsH@Xhydra<>select 7 * 24 * 60 seconds from dual;

   SECONDS
----------
     10080

kIsH@Xhydra<>EXEC DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(interval => 60, retention => 10080);

PL/SQL procedure successfully completed.

Leave a Reply