Use below to check the current interval for AWR SNAP.
SQL> set lines 200
SQL> col SNAP_INTERVAL format a20
SQL> col RETENTION format a20
SQL> select * from dba_hist_wr_control;
DBID SNAP_INTERVAL RETENTION TOPNSQL
---------- -------------------- -------------------- ---------- ----------------------------
3275763 +00000 01:00:00.0 +00008 00:00:00.0 DEFAULT
Here interval is set to 1 hour and retention is set to 8 days.
To change the retention and interval settings. Interval will be set to 15 minutes and retention to 35 days (35x24x60 = 50400)
SQL> exec dbms_workload_repository.modify_snapshot_settings(interval => 15, retention => 50400)
PL/SQL procedure successfully completed.
SQL> select * from dba_hist_wr_control;
DBID SNAP_INTERVAL RETENTION TOPNSQL
---------- -------------------- -------------------- -------------------------------------
3275763 +00000 00:15:00.0 +00035 00:00:00.0 DEFAULT
No comments:
Post a Comment