1. 程式人生 > >轉 oracle 預設自動統計資訊 時間修改

轉 oracle 預設自動統計資訊 時間修改

 

############sql3:

https://blog.csdn.net/dataminer_2007/article/details/41363417
http://blog.51cto.com/hunt1574/2136259


b6usrg82hwsa3 28,795.60 call dbms_stats.gather_database_stats_job_proc ( )

select window_name, repeat_interval, duration, enabled from dba_scheduler_windows where enabled='TRUE';


修改週六日自動任務的執行時間開始於22點,持續時間240分鐘:
exec dbms_scheduler.disable( name => 'SATURDAY_WINDOW', force => TRUE);
exec dbms_scheduler.set_attribute( name => 'SATURDAY_WINDOW', attribute => 'repeat_interval',value => 'freq=daily;byday=SAT;byhour=22;byminute=0;bysecond=0');
exec dbms_scheduler.set_attribute( name => 'SATURDAY_WINDOW', attribute => 'DURATION',value => numtodsinterval(240,'minute'));
exec dbms_scheduler.enable( name => 'SATURDAY_WINDOW');

 

exec dbms_scheduler.disable( name => 'SUNDAY_WINDOW, force => TRUE);
exec dbms_scheduler.set_attribute( name => 'SUNDAY_WINDOW', attribute => 'repeat_interval',value => 'freq=daily;byday=SUN;byhour=22;byminute=0;bysecond=0');
exec dbms_scheduler.set_attribute( name => 'SUNDAY_WINDOW', attribute => 'DURATION',value => numtodsinterval(240,'minute'));
exec dbms_scheduler.enable( name => 'SUNDAY_WINDOW');