The ALTER_STATS_HISTORY_RETENTION procedure modifies the retention period of historical statistics. The default retention period is 31 days.
Syntax
DBMS_STATS.ALTER_STATS_HISTORY_RETENTION (
retention IN NUMBER);
Parameters
The retention parameter specifies the retention period of historical statistics, in days.
Exceptions
The error code ORA-20000 indicates that you do not have the required privileges.
Examples
Change the retention period of historical statistics to 15 days.
obclient> CALL DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(15);
Query OK, 0 rows affected