修改awr报告的保留时间和快照间隔
exec dbms_workload_repository.modify_snapshot_settings(interval=>60,retention=>7*2*24*60);
有时遇到系统遇到复杂问题,处理周期长,需要保留系统的快照周期,便于分析问题,这时,需要延长延长快照时间周期
默认一般是一周时间,我们这里更改为2周的快照周期。
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> select * from dba_hist_wr_control;
DBID
----------
SNAP_INTERVAL
---------------------------------------------------------------------------
RETENTION
---------------------------------------------------------------------------
TOPNSQL CON_ID
---------- ----------
824967682
+00000 01:00:00.0
+