Oracle: Change AWR snapshot interval and retention
SQL> execute dbms_workload_repository.modify_snapshot_settings (interval => 10, retention => 20160);
PL/SQL procedure successfully completed.
10 mins and 14 days in mins:
execute dbms_workload_repository.modify_snapshot_settings ( interval => 60, retention => 1576800); <-- 3 years in minutes
To get the current settings:
select
extract( day from snap_interval) *24*60+
extract( hour from snap_interval) *60+
extract( minute from snap_interval ) "Snapshot Interval",
extract( day from retention) *24*60+
extract( hour from retention) *60+
extract( minute from retention ) "Retention Interval"
from dba_hist_wr_control;
Comments
Post a Comment