DB2 & Scheduled Tasks
So you want to schedule some tasks – maybe weekly backups to complement your daily ones. Or some housekeeping in the form rbinds. The easiest place to do this is in the Task Center but what if it isn’t setup? Not a problem the following steps will take you through it and have you scheduling DB2 jobs before you know it.
Step 1: Setup DB2 Administration Server, DAS:
Create a local account called “dasadmin” – set the password not to expire
Place this user in the DB2ADMIN group
From a cmd line issue:
- db2admin create /user:dasadmin /password:<password>
Step 2: Create your Tools Database:
Now create a ‘Tools’ Database for the DB2 Administration Server to hold all its scheduled tasks
- create tools catalog cc create new database toolsdb
NB: You may need to run the following to update the das admin configuration:
- update admin cfg using toolscat_inst db2 toolsdb DBNAME toolsdb SCHEMANAME toosldb
You can check this by issuing:
- db2 get admin cfg
Finally, check the db2 DAS service is set to automatic otherwise scheduled tasks will not run:
Step 3: Create you scheduled task:
As an example I have used the backup wizard as this is a pretty common requirement for customers.
Run the backup wizard from the Control Center:
Next set the Media Type you desire – in this case we have selected “TSM”
On the next screen of the wizard specify the type of backup. In this case, we have selected a full offline backup issuing a ‘Quiesce’ prior to submitting the backup.
Select the option to “Create this as a task in the Task Center” and give the new task a meaningful name. Remember to update the execution time. In this case we have set it to run every Saturday at 23:00.
Finally the summary page is displayed – select the option to launch the Task Center to display your new task.
Open the newly created task and change to the “Notifications” tab. In here you can specify to log the success or failure of your task in the journal database.
That’s it. Remember to check the Journal from the Control Center to ensure your scheduled tasks are running as expected. Or even better configure your DB2 Administration Server to send email notifications. More on that next time
Tags: backups, DAS, database, DB/2, ECM, scheduling
You can comment below, or link to this permanent URL from your own site.






