To enable or disable specific maintenance tasks in any subset of maintenance windows, you can use the DBMS_AUTO_TASK_ADMIN
PL/SQL package.
- Enabling and Disabling Maintenance Tasks for all Maintenance Windows
With a single operation, you can disable or enable a particular automated maintenance task for all maintenance windows. - Enabling and Disabling Maintenance Tasks for Specific Maintenance Windows
By default, all maintenance tasks run in all predefined maintenance windows. You can disable a maintenance task for a specific window.
EXECUTE DBMS_AUTO_TASK_ADMIN.DISABLE;
EXECUTE DBMS_AUTO_TASK_ADMIN.ENABLE;
exec dbms_auto_task_admin.enable(client_name=>'auto space advisor',operation=> NULL,window_name=>NULL);
col window_name for a20
select window_name,autotask_status from dba_autotask_window_clients;
col last_change for a40
select client_name,status,last_change from dba_autotask_client;
sql tuning advisor ENABLED
auto optimizer stats collection ENABLED
auto space advisor ENABLED
select autotask_status, optimizer_stats, segment_advisor, sql_tune_advisor
from dba_autotask_window_clients where window_name='MONDAY_WINDOW';