DB2 Version 10.1 for Linux, UNIX, and Windows

Listing the status of tasks in the administration task scheduler

You can use the ADMIN_TASK_STATUS administrative view to list the status of task execution in the administrative task scheduler.

Before you begin

About this task

When a task is executed, the administrative task scheduler creates a task status record before calling the task's procedure. The status record contains the task name, task ID, invocation number, agent ID and begin time. The status of the task is set to RUNNING. After the task executes, the remaining fields in the status record are updated with values that are based on the outcome of the task.

Restrictions

When you query the ADMIN_TASK_STATUS view, it will only return the tasks that were created by your session authorization ID.

Procedure

  1. Connect to the database.
  2. Issue a query against the ADMIN_TASK_STATUS administrative view. For example:
    SELECT * from SYSTOOLS.ADMIN_TASK_STATUS
    Tip: You can relate the task execution status to the task definition by joining the output from ADMIN_TASK_LIST and ADMIN_TASK_STATUS administrative views on the NAME or TASKID columns.

Results