Before you can use the Administrative Task Scheduler views for DB2 you will need to initialize the views by creating a Task.

Goal:

To initialize the Administrative Task Scheduler views.

Steps to complete:

Details:

The stored procedure SYSPROC.ADMIN_TASK_ADD is used to create a new Administrative Task. When you run the command on the right, a Task will be created using the stored procedure SQLJ.REFRESH_CLASSES. This stored procedure causes the reloading of user defined classes used by Java stored procedures or Java UDFs in the current database connection, and is used here because it is present on all systems and has no parameters. The other parameters are set to indicate to the task scheduler that we do not want the task to run.


>>-CALL SYSPROC.ADMIN_TASK_ADD--(--name-,------------------------->
>--+-begin-timestamp-+-,--+-end-timestamp-+-,--------------------->
    -NULL------------      -NULL---------- 
>--+-max-invocations-+-,--+-schedule-+-,--+-procedure-schema-+-,-->
    -NULL------------      -NULL----- 
>--procedure-name-,--+-procedure-input-+-,--+-options-+-,--------->
                      -NULL------------      -NULL---- 
>--+-remarks-+---------------------------------------------------><     -NULL---- 

View the SYSPROC.ADMIN_TASK_ADD complete procedure definition here.

If you wish to remove a task, you will need to use the procedure SYSPROC.ADMIN_TASK_REMOVE.

View the SYSPROC.ADMIN_TASK_REMOVE procedure definition here.