Oracle Database - AutoTask (Automated maintenance tasks)

> Database > Oracle Database

1 - About

The automated maintenance tasks infrastructure (known as AutoTask) schedules tasks to run automatically in Oracle Scheduler windows known as maintenance windows.

By default, one window is scheduled for each day of the week.

3 - Privileges

grant EXECUTE ON DBMS_AUTO_TASK_ADMIN TO hr;

4 - Management

4.1 - List

COL CLIENT_NAME FORMAT a31
SELECT
  CLIENT_NAME,
  STATUS
FROM
  DBA_AUTOTASK_CLIENT;
CLIENT_NAME                     STATUS
------------------------------- --------
auto optimizer stats collection ENABLED
auto space advisor              ENABLED
sql tuning advisor              ENABLED

where:

Advertising

4.2 - Disable

BEGIN
  DBMS_AUTO_TASK_ADMIN.DISABLE (  
    client_name  => 'auto optimizer stats collection'
,   operation    => NULL
,   window_name  => NULL 
);
END;
/

4.3 - Enable

BEGIN
  DBMS_AUTO_TASK_ADMIN.ENABLE (  
    client_name  => 'auto optimizer stats collection'
,   operation    => NULL
,   window_name  => NULL 
);
END;
/

5 - Documentation / Reference

db/oracle/autotask.txt · Last modified: 2017/09/06 19:30 by gerardnico