启用与禁用统计信息自动收集
适用于11g与12c
点击(此处)折叠或打开
-
11g的是 周一到周五 22:00-2:00 周六周日 6:00-4:00
-
SELECT w.window_name, w.repeat_interval, w.duration, w.enabled
-
FROM dba_autotask_window_clients c, dba_scheduler_windows w
-
WHERE c.window_name = w.window_name
-
AND c.optimizer_stats = 'ENABLED';
-
查看job
-
select client_name,status from dba_autotask_client;
-
禁用自动收集
-
exec DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'auto optimizer stats collection',operation => NULL,window_name => NULL);
-
启用自动收集
- exec DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'auto optimizer stats collection',operation => NULL,window_name => NULL)