Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 3

$
0
0
Steps to Purge the OPTSTATs:


1)   Show the current history level:

        select dbms_stats.get_stats_history_availability from dual;

2)      Assuming  history is 100 days old and you want to purge it until 10 days old:

begin
for i in reverse 10..100
loop
dbms_stats.purge_stats(sysdate-i);
end loop;
end;
/

3)      Show the new history level

       select dbms_stats.get_stats_history_availability from dual;


4)       Output must show that the GET_STATS_HISTORY_AVAILABILITY  is  equal to sysdate - (n).

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>