Want to turn off / disable Oracle's automatic tasks ( dbms_auto_task_admin.disable ):

note: be careful copying the code below from Windows to Unix as a Windows copy may corrupt the single quotes – just edit them and replace
Want to turn off or change Oracle Scheduler windows

# disable a maintenance window completely
BEGIN
 dbms_scheduler.disable(
 name => 'WEEKNIGHT_WINDOW');
END;
/
# change the duration of a window
BEGIN
 dbms_scheduler.set_attribute(
 name => 'WEEKEND_WINDOW',
 attribute => 'DURATION',
 value => numtodsinterval(3, 'hour'));
END;
/
#Re-enable a window
BEGIN
 dbms_scheduler.enable(
 name => 'WEEKEND_WINDOW');
END;
/

Want to turn off Oracle’s automatic tasks ( dbms_auto_task_admin.disable ):
sqlplus / as sysdba
or better yet sqldeveloper
— query the status

select *
from dba_autotask_window_clients;

autotask
turn them all off – at a sqlplus prompt:

exec dbms_auto_task_admin.disable;

turn them off selectively

BEGIN
dbms_auto_task_admin.disable(client_name => ‘auto space advisor’, operation => NULL, window_name => NULL);
dbms_auto_task_admin.disable(client_name => ‘sql tuning advisor’, operation => NULL, window_name => NULL);
dbms_auto_task_admin.disable(client_name => ‘auto optimizer stats collection’, operation => NULL, window_name => NULL);
END;
/

Leave a Comment

Scroll to Top