Synchronization between administrative task schedulers in a data sharing environment

The administrative task schedulers of a data sharing group synchronize themselves through their task lists.

When a task is added, the ADMIN_TASK_ADD stored procedure is called by a Db2 member. The administrative task scheduler that is associated with this Db2 member adds the task to the common task list. The task list is shared among all administrative task schedulers that are associated with the data sharing group members. The next time that an administrative task scheduler accesses the list, it detects the new task.

All administrative task schedulers of the data sharing group access this task list once per minute to check for new tasks. The administrative task scheduler that adds a task does not have to check the list, and can execute the task immediately. Any other administrative task scheduler can execute a task only after finding it in the updated task list. Any administrative task scheduler can remove a task without waiting.

To remove a task, the ADMIN_TASK_REMOVE stored procedure is called by a Db2 member. The administrative task scheduler that is associated with this Db2 member removes the task from the common task list. The next time that an administrative task scheduler checks the list, which is within one minute after the task has been removed, it detects that the task was deleted.

An administrative task scheduler cannot execute a task without first locking it in the task list. Locking a task prevents deleted tasks from being executed, because a deleted task is no longer in the list and cannot be locked. If a task cannot be locked, it cannot be executed. The locking also prevents double executions. A task that one administrative task scheduler has in progress is already locked, so no other administrative task scheduler can lock and execute the task.