Thursday, August 1, 2013

Snap Interval checking and altering:

  Snap Interval checking and altering:



Check:

SQL> SELECT extract(day from snap_interval) *24*60+extract(hour from snap_interval) *60+extract(minute from snap_interval) snapshot_Interval,
   2   extract(day from retention) *24*60+extract(hour from retention) *60+extract(minute from retention) retention_Interval
   3   FROM dba_hist_wr_control;

 SNAPSHOT_INTERVAL RETENTION_INTERVAL
 ----------------- ------------------
                60              11520

Alter

SQL> execute dbms_workload_repository.modify_snapshot_settings (interval => 15);

 PL/SQL procedure successfully completed.

Re-Check

SQL> SELECT extract(day from snap_interval) *24*60+extract(hour from snap_interval) *60+extract(minute from snap_interval) snapshot_Interval,
   2   extract(day from retention) *24*60+extract(hour from retention) *60+extract(minute from retention) retention_Interval
   3   FROM dba_hist_wr_control;

 SNAPSHOT_INTERVAL RETENTION_INTERVAL
 ----------------- ------------------
                15              11520


SQLs for copying and pasting:

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;


 execute dbms_workload_repository.modify_snapshot_settings (interval => 15);
 

No comments:

Post a Comment