DB2 10.5 for Linux, UNIX, and Windows

Setting up the administrative task scheduler

The administrative task scheduler is disabled by default. You can use the procedures and views to define and modify tasks but the scheduler will not execute the tasks. To set up the administrative task scheduler, configure the DB2_ATS_ENABLE registry variable and create the SYSTOOLSPACE table space.

Procedure

  1. Set the DB2_ATS_ENABLE registry variable to YES, TRUE, 1, or ON. For example:
    db2set DB2_ATS_ENABLE=YES
  2. Create the SYSTOOLSPACE table space.
    Like other DB2® administration tools, the administrative task scheduler depends on the SYSTOOLSPACE table space to store historical data and configuration information. You can check if the table space already exists in your database system with the following query:
    SELECT TBSPACE FROM SYSCAT.TABLESPACES WHERE TBSPACE = 'SYSTOOLSPACE'
    If your database does not have this table space, you must create it. Otherwise you receive an error message when you try to add a task to the administrative task scheduler: SQL0204N "SYSTOOLSPACE" is an undefined name. SQLSTATE=42704

    Any user that belongs to the SYSADM or SYSCTRL group has authority to create this table space. For instructions, refer to "SYSTOOLSPACE and SYSTOOLSTMPSPACE table spaces".

    For example:
    CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP
      MANAGED BY AUTOMATIC STORAGE
      EXTENTSIZE 4
  3. Ensure that the instance owner or the user ID running the DB2 instance service has DBADM authority. Starting with Version 9.7, SYSADM authority no longer has implicit DBADM authority. For example:
    GRANT DBADM ON DATABASE TO db2admin
  4. Activate your database. Your database must be active for your tasks to execute on time. The best way to do this is to use the ACTIVATE DATABASE command. Alternatively, you can keep a database active if you maintain at least one database connection at all times.

Results

Once the administrative task scheduler is set up, the DB2 Autonomic Computing Daemon starts checking for new or updated tasks by connecting to active databases every five minutes.

What to do next

If you have not already done so, add tasks to the administrative task scheduler. The administrative task scheduler executes the tasks according to the defined task schedules.