一、运安—处理信息统计问题(调整统计时间)
自动任务的优先级>维护窗口时间
1、调整维护窗口时间
select window_name,resource_plan,start_date,repeat_interval,duration,next_start_date,enabled,active from dba_scheduler_windows; select window_name,resource_plan,repeat_interval,duration,next_start_date,enabled,active from dba_scheduler_windows; select * from dba_autotask_client; select client_name,status,window_group from dba_autotask_client; select client_name,status,window_group from dba_autotask_client;
2、禁用自动任务(
BEGIN
dbms_auto_task_admin.disable(
client_name => 'auto optimizer stats collection',
operation => NULL,
window_name => NULL);
END;
/
BEGIN
dbms_auto_task_admin.disable(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/
BEGIN dbms_auto_task_admin.disable( client_name => 'auto space advisor', operation => NULL, window_name => NULL); END; /
3、修改窗口属性(周一-周日)
select window_name,resource_plan,repeat_interval,duration,next_start_date,enabled,active from dba_scheduler_windows;
begin
dbms_scheduler.set_attribute
(
name => 'MONDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=MON;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'TUESDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=TUE;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'WEDNESDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=WED;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'THURSDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=THU;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'FRIDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=FRI;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'SATURDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=SAT;byhour=7;byminute=50; bysecond=0'
);
end;
/
begin
dbms_scheduler.set_attribute
(
name => 'SUNDAY_WINDOW',
attribute => 'REPEAT_INTERVAL',
value => 'freq=daily;byday=SUN;byhour=7;byminute=50; bysecond=0'
);
end;
/
4、启用自动任务
BEGIN dbms_auto_task_admin.enable( client_name => 'auto optimizer stats collection', operation => NULL, window_name => NULL); END; / BEGIN dbms_auto_task_admin.enable( client_name => 'sql tuning advisor', operation => NULL, window_name => NULL); END; / BEGIN dbms_auto_task_admin.enable( client_name => 'auto space advisor', operation => NULL, window_name => NULL); END; /
二、运安—数据清理查看
地址:https://www.topunix.com/post-6053.html