Oracle DBMS_ADBTASK_ADMIN
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose APIs for administering Oracle Autonomous DataBase tasks
AUTHID DEFINER
Dependencies
ADBTASK_CLIENT CDB_ADBTASK_CLIENT CDB_ADBTASK_SETTINGS
ADBTASK_SCHEDULE CDB_ADBTASK_SCHEDULE DBMS_AUTOTASK_PRVT_LIB
ADBTASK_SETTINGS    
Documented No
First Available 20c
Security Model Owned by SYS with EXECUTE granted to the DBA role
Source {ORACLE_HOME}/rdbms/admin/
Subprograms
 
DISABLE (new 20c)
Disable an autonomous database task dbms_adbtask_admin.disable(task_name IN VARCHAR2);
SELECT * FROM adbtask_settings WHERE task_name = 'Auto Index Task';

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      3 Auto Index Task                                            900   3600 TRUE

exec dbms_adbtask_admin.disable('Auto Index Task');

SELECT * FROM adbtask_settings WHERE task_name = 'Auto Index Task';

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      3 Auto Index Task                                            900   3600 FALSE
 
ENABLE (new 20c)
Enable an autonomous database task dbms_adbtask_admin.enable(task_name IN VARCHAR2);
SELECT * FROM adbtask_settings WHERE task_name = 'Auto Index Task';

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      3 Auto Index Task                                            900   3600 FALSE


exec dbms_adbtask_admin.enable('Auto Index Task');

SELECT * FROM adbtask_settings WHERE task_name = 'Auto Index Task';

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      3 Auto Index Task                                            900   3600 TRUE
 
MODIFY_ADBTASK_SETTINGS (new 20c)
Modifies the interval or maximum run time of an Autonomous Database task dbms_adbtask_admin.modify_adbtask_settings(
task_name       IN VARCHAR2,
attribute_name  IN VARCHAR2,
attribute_value IN NUMBER);
SELECT unique task_id, task_name, interval, max_run_time MAX_RT, SUBSTR(enabled,1,1) ENABLED
FROM adbtask_settings
ORDER BY 1,2;

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      0 AWR Warehouse Auto-Import                                  600    900 FALSE
      1 AWR Warehouse Auto-Export                                86400    900 FALSE
      2 KET Autonomous Task Test                                   900  10800 FALSE
      3 Auto Index Task                                            900   3600 FALSE
      4 Auto Statistics Management Task                            900   3600 FALSE
      5 Auto STS Capture Task                                      900    900 FALSE
      6 SQLQ: Auto-purge unused SQL quarantine configurations   604800    300 FALSE
      7 Auto SPM Task                                             3600   1800 FALSE
      8 Auto Zonemap Task                                         3600   3600 FALSE
      9 Auto-STS Flush                                             300    300 TRUE
     10 Auto-STS Purge                                           86400    600 TRUE
     11 Managed Stream Flush                                       300    900 FALSE


exec dbms_adbtask_admin.modify_adbtask_settings('Auto Zonemap Task', 'INTERVAL', 7200);

PL/SQL procedure successfully completed.

SELECT * FROM adbtask_settings WHERE task_name = 'Auto Zonemap Task';

TASK_ID TASK_NAME                                             INTERVAL MAX_RT ENABLED
------- ----------------------------------------------------- -------- ------ -------
      8 Auto Zonemap Task                                         7200   3600 FALSE

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_AUTO_INDEX
DBMS_AUTO_INDEX_INTERNAL
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx