Categories:

System Functions (System Control)

SYSTEM$TASK_DEPENDENTS_ENABLE

Recursively enables all dependent tasks tied to a specified root task. This function allows the owner of a simple tree of tasks (i.e. the role with the OWNERSHIP privilege on the tasks) to enable the tasks by executing a single SQL statement rather than enabling each task individually (using ALTER TASK … RESUME).

For more information about tasks, see Executing SQL Statements on a Schedule Using Tasks.

Syntax

SYSTEM$TASK_DEPENDENTS_ENABLE( '<root_task_name>' )

Arguments

root_task_name

Name of the root task in a simple tree of tasks.

Usage Notes

  • root_task_name is a string so it must be enclosed in single quotes:

    • Note that the entire name must be enclosed in single quotes, including the database and schema (if the name is fully-qualified), i.e. '<db>.<schema>.<root_task_name>'.

    • If the task name is case-sensitive or includes any special characters or spaces, double quotes are required to process the case/characters. The double quotes must be enclosed within the single quotes, i.e. '"<root_task_name>"'.

Examples

Enable all dependent tasks that are children of a root task with a case-insensitive name:

SELECT SYSTEM$TASK_DEPENDENTS_ENABLE('mydb.myschema.mytask');

Enable all dependent tasks that are children of a root task with a case-sensitive name:

SELECT SYSTEM$TASK_DEPENDENTS_ENABLE('mydb.myschema."myTask"');