计划任务不执行,检查到
select client_name,task_name,operation_name,status from dba_autotask_task;
结果为空
解决:
select client_name,status from dba_autotask_client;
auto optimizer stats collection 应该是enabled
select client_name,status from dba_autotask_task;
应该有auto optimizer stats collection且 status应该是enabled
如果没有,有可能是mmon清理后 没有插入task,也有可能是窗口时间太短(只给5分钟)
查一下当前窗口:
select window_name,b.enabled,duration from dba_scheduler_windows b;
调大执行窗口:
exec dbms_scheduler.set_attribute('monday_window','duration',' 000 04:00:00');
exec dbms_scheduler.set_attribute('tuesday_window','duration',' 000 04:00:00');
exec dbms_scheduler.set_attribute('wednesday_window','duration',' 000 04:00:00');
exec dbms_scheduler.set_attribute('thursday_window','duration',' 000 04:00:00');
exec dbms_scheduler.set_attribute('friday_window','duration',' 000 04:00:00');
exec dbms_scheduler.set_attribute('saturday_window','duration',' 000 20:00:00');
exec dbms_scheduler.set_attribute('sunday_window','duration',' 000 20:00:00');
再确认窗口执行的duration是否足够长:
select window_name,b.enabled,duration from dba_scheduler_windows b;
平时至少给4小时,周末(或业务空闲期)给20小时。
参考:计划任务未运行且视图 dba_autotask_task 为空(文档 id 1610257.1)
阅读(686) | 评论(0) | 转发(0) |