1、select * from v$version;
2、select * from dba_hist_wr_control;
检查当前系统的保留时间为8天,1小时采样一次.
3、这里设置每半个小时收集一次, 收集到的数据保留15天,单位都是秒。
exec dbms_workload_repository.modify_snapshot_settings(retention=> 21600, interval=> 30);
SQL> exec dbms_workload_repository.modify_snapshot_settings(retention=> 21600, interval=> 30);
PL/SQL procedure successfully completed.
SQL> select * from dba_hist_wr_control;
DBID
----------
SNAP_INTERVAL
---------------------------------------------------------------------------
RETENTION
---------------------------------------------------------------------------
TOPNSQL
----------
922814785
+00000 00:30:00.0
+00015 00:00:00.0
DEFAULT
SQL>
后续要看实际效果如何,否则这个sysaux表空间一直在增加。