Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Monday, October 3, 2011

Global AWR report for RAC and AWR snapshot interval change

In 11gR2 we have two new scripts awrgrpt.sql & awrgdrpt.sql for RAC

awrsqrpt.sql -- Standard SQL statement Report
awrddrpt.sql -- Period diff on current instance
awrrpti.sql -- Workload Repository Report Instance (RAC)
awrgrpt.sql -- AWR Global Report (RAC)
awrgdrpt.sql -- AWR Global Diff Report (RAC)
spawrrac.sql  -- Server Performance RAC report
spawrio.sql
 





SQL> 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) retention_interval
from dba_hist_wr_control; 
SNAPSHOT_INTERVAL RETENTION_INTERVAL_DAYS
----------------- ------------------
               60                  8


Change it to 15 mins and 30 days



SQL> execute dbms_workload_repository.modify_snapshot_settings(

interval => 15,
retention => 43200);

PL/SQL procedure successfully completed.

SQL>  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) retention_interval
from dba_hist_wr_control;   2    3    4
SNAPSHOT_INTERVAL RETENTION_INTERVAL
----------------- ------------------
               15                 30

 





 

No comments: