Scheduling Considerations

Automating the generation of utility jobs and exploiting schedulers to run the jobs allows the administrators to run the Db2 housekeeping hands free. The generated jobs can be handed over to the scheduler for processing on demand. In addition, schedulers enable you to balance your workload and control your resource usage.

Benefits of a scheduler
Schedulers submit jobs at a predefined time and track the progress of jobs. Schedulers can identify if a job failed and automate the restart of the job at the desired failing step. The JCL can be manipulated before submit and symbols can be resolved based on currently assigned values. Dependencies between jobs can be defined so that some jobs can run in parallel and some wait for jobs to complete successfully before being submitted. These functions are essential to automate the Db2 utility processing especially when parallel processing is required.

Handing over jobs to the scheduler
Most schedulers have some kind of an API that allows defining the utility jobs to the scheduler. The definition includes directions when to run the jobs, the dependencies between the jobs, how to handle restart and notifications. Automating the generation of utility jobs could then exploit this API to hand over jobs to the scheduler.

Executing parallel jobs
Multiple jobs can be handed over to the scheduler to process a large number of objects. To speed up the process, each job can be executed in parallel and to process a subgroup of the objects at the same time. When running in parallel mode you still need to do some of the work for all the objects at once. For example, you can take an image copy for each subgroup separately, but following the backup you would want to take a syncpoint for all the objects in a single statement. To do that you need to use a job that is scheduled after all the parallel jobs have completed successfully. The objects should be subgrouped intellegently based on the objects size to allow the parallel jobs to complete at about the same time.

Administrative Scheduler
Starting with Db2 version 8, each Db2 subsystem or data sharing member now has a new started task for the Admin Scheduler. The Administrative Scheduler runs tasks that are defined in the Administrative Scheduler task list, according to a requested schedule. Tasks are stored procedures or JCL jobs. Administrators could take advantage of the Admin Scheduler to schedule utility jobs and other Db2 related housekeeping tasks.