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, control your resource usage and automate restart.
TUC has a unique mechanism that allows users to trigger backup jobs and QUIESCE jobs at meaningful points in time that fits into the application’s jobs flow. Jobs can be handed over to the scheduler as needed. TUC allows full integration with application jobs and avoids collision between utility jobs and application processing.
Users and jobs can place orders, a request for utility processing. The order must specify the utility stream name, and the profile name used to group the desired objects. The order also includes the desired set of utility options. TUC processes pending orders and identifies which jobs are required. The jobs are handed over to the scheduler for submission. The utility jobs includes preparing and completion steps that mark the order execution, failure or successful completion. The TUC dialogs allows you to see the status and progress of the jobs.
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.
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 can be stored procedures or JCL jobs. Administrators could take advantage of the Admin Scheduler to schedule utility jobs and other DB2 related housekeeping tasks. The Admin Scheduler does not handle the restart of jobs in case of a failure. Parallelism is somewhat limited because the scheduler does not allow scheduling a task that can wait for more than one task.
TUC allows you to easily add, update and remove tasks. The dialog allows you to display the tasks and track their progress. You can also export and import tasks. TUC can also add tasks to process pending utility orders, except utility jobs that require parallel processing.