首页 > 其他 > 详细

11g统计信息自动收集任务

时间:2019-01-20 23:14:32      阅读:205      评论:0      收藏:0      [点我收藏+]

1、查看统计信息自动收集任务的开启情况。

select client_name,status from dba_autotask_client;

技术分享图片

 

2、查看自动收集任务各个窗口的开启情况。

col optimizer_stats for a20;
col segment_advisor for a20;
col sql_tune_advisor for a20;
set lines 200 pages 200
select window_name,optimizer_stats,segment_advisor,sql_tune_advisor from dba_autotask_window_clients;

技术分享图片

DBA_AUTOTASK_WINDOW_CLIENTS displays the windows that belong to MAINTENANCE_WINDOW_GROUP, along with the Enabled or Disabled status for the window for each maintenance task. Primarily used by Enterprise Manager.

 

3、查看当前统计信息自动收集任务具体的窗口时间。

select window_name,repeat_interval,duration,ENABLED from dba_scheduler_windows;

技术分享图片

 

4、整个关闭自动统计信息收集任务。

BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name=>auto optimizer stats collection,
operation=>NULL,
window_name=>NULL);
END;
/

技术分享图片

 

5、关闭某个窗口的统计信息收集任务。

先根据 3 查到有哪些窗口,然后禁用。 例如:禁用周二的窗口。

BEGIN
dbms_auto_task_admin.disable(
client_name => auto optimizer stats collection,
operation => NULL,
window_name => TUESDAY_WINDOW);
END;
/

技术分享图片

 

11g统计信息自动收集任务

原文:https://www.cnblogs.com/nathon-wang/p/10296568.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!