啟用oracle 11g自動收集統計資訊

來源:互聯網
上載者:User

今天接到朋友資料庫一個case,在DBCA建庫時,把自動收集統計資訊的選項去掉了,資料庫運行半年沒有收集過統計資訊,現在要啟用方法如下:



exec DBMS_AUTO_TASK_ADMIN.ENABLE();
exec DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'auto optimizer stats collection',operation =>'auto optimizer stats job',window_name=> null);
exec DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'auto optimizer stats collection',operation => NULL,window_name => NULL);
 
 
select window_name,
       window_next_time,
       optimizer_stats,
       aa.WINDOW_ACTIVE,
       aa.SEGMENT_ADVISOR,
       aa.AUTOTASK_STATUS,
       aa.OPTIMIZER_STATS
  from dba_autotask_window_clients aa
order by window_next_time

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.