DB2 Version 9.7 for Linux, UNIX, and Windows

Tools catalog database and DB2 administration server (DAS) scheduler setup and configuration

The tools catalog database contains task information created by the Task Center and Control Center. These tasks are run by the DB2® administration server's scheduler. The scheduler and the tools catalog database always work together; neither can function without the other.

Before you begin

The DB2 administration server must be installed.

About this task

The scheduler is a specific piece of the DB2 administration server that acts as an agent to read the tools catalog database and runs the tasks at their respective times.

The goal is to set up and configure the tools catalog database and the DAS scheduler.

The DB2 administration server Configuration process tells the Scheduler the location of the tools catalog database, and whether or not the Scheduler should be enabled. By default, when a tools catalog database is created, its corresponding DAS configuration is updated. That is, the Scheduler is configured and ready to use the new tools catalog; there is no need to restart the DAS.

The tools catalog database can be created on a server that is local or remote from the Scheduler system. If the tools catalog is created on a remote server, it must be cataloged at the scheduler tools catalog database instance (toolscat_inst). In addition, the scheduler user ID must be set by using the command db2admin setschedid, so that the scheduler can connect and authenticate with the remote catalog. The full syntax for the db2admin command is found in the Command Reference.

The DAS scheduler requires a Java virtual computer (JVM) to access the tools catalog information. The JVM information is specified using the jdk_path DB2 administration server configuration parameter of the DAS.

The jdk_64_path configuration parameter is required if you are creating a tools catalog against a 64-bit instance on one of the platforms that supports both 32- and 64-bit instances (AIX®, Sun, and HP-UX).

The Control Center and Task Center access the tools catalog database directly from the client. The tools catalog database therefore needs to be cataloged at the client before the Control Center can make use of it. The Control Center provides the means to automatically retrieve information about the tools catalog database and create the necessary directory entries in the local node directory and database directory. The only communication protocol supported for this automatic cataloging is TCP/IP.

One of the DAS configuration parameters is called exec_exp_task. This parameter specifies whether or not the scheduler executes the tasks that have been scheduled in the past, but have not yet been run. The scheduler only detects expired tasks when it starts up.

For example, if you have a job scheduled to run every Saturday, and the scheduler is turned off on Friday and then restarted on Monday, the job scheduled for Saturday is now a job that is scheduled in the past. If exec_exp_task is set to Yes, your Saturday job runs when the scheduler is restarted.

The other DAS configuration parameters required by the scheduler consist of identifying the tools catalog database and the Simple Mail Transfer Protocol (SMTP) server to be used for notification.

Example

The following examples explain how these parameters are used:
  • An example Windows server setup.
    1. The tools catalog database can be any name you want. In this example, the tools catalog database is called "CCMD" and is created under the DB2 database instance on server computer Host1 (tcp/ip hostname Host1). A schema name is used to uniquely identify a tools catalog within a given database. For the purposes of this example, assume the schema name is "CCADMIN".
    2. The instance called "DB2" is setup for TCP/IP communications using port number 50000 by using:
         db2set -i DB2 DB2COMM=TCPIP
         db2 update dbm cfg using svcename db2cDB2
         db2stop
         db2start
    3. The db2cDB2 service name is defined in %SystemRoot%\system32\drivers\etc\services, as follows:
         db2cDB2     50000/tcp     #connection port for the DB2 instance DB2
    4. The tools catalog is created using the CREATE TOOLS CATALOG command. This will create the tools catalog tables and views with a schema name corresponding to the catalog name in the specified database. The DB2 administration server configuration parameters are automatically updated and the scheduler is enabled and started.
    5. Assume that the SMTP server used for e-mail notifications is on computer Host2 (tcp/ip hostname Host2). This information is then specified to the DB2 administration server using:
         db2 update admin cfg using smtp_server Host2
      This might be done during the installation process. If it is done later, it needs to be manually specified to the DAS using a DB2 Version 8 CLP command as shown above.
    6. The IBM® Software Development Kit (SDK) for Java on Windows is installed under %DB2PATH%\java\jdk. This should be already specified to the DAS. It can be verified, and set if necessary, using:
         db2 update admin cfg using jdk_path c:\SQLLIB\java\jdk
      This assumes that the DB2 database manager is installed under C:\SQLLIB.
      Note: If the DAS is going to be created by db2admin create, make sure you use the /USER and /PASSWORD options. The user account is used by the scheduler process. Without it, the scheduler will not be started properly. The user account should have SYSADM authority on the tools catalog instance.
      If the DAS is going to be created by db2admin create, and no /USER and /PASSWORD options are to be specified at that time, then you can update the user information at a later time. This update is done on DAS by running the following commands:
         db2admin stop
         db2admin setid user_account_ID password 
         db2admin start
  • An example Windows client setup.
    1. Assume that the Control Center is running on client computer C1 (tcp/ip hostname C1).
    2. The DAS is cataloged as an administration server node in the local node directory using either the Configuration Assistant or the Control Center, or by using the command:
         db2 catalog admin tcpip node Host1 remote Host1 system Host1 ostype NT
    3. If the Task Center is started and the system Host1 is selected, the Task Center attempts to find the tools catalog database in the local directory. (The Control Center could be used in place of the Task Center.) If not found, it attempts to catalog the node and database using:
         db2 catalog  tcpip node unique-node-name 
           remote Host1 server 50000
           remote_instance DB2 system Host1 ostype NT
         db2 catalog db CCMD as unique-db-alias at node unique-node-name
      If the automatic cataloging is unsuccessful, the database can be cataloged using the Configuration Assistant or the Control Center. The database will then be recognized and used by the Task Center.
  • An example AIX server setup.
    1. The tools catalog database can be any name you want. In this example, the tools catalog database is called "CCMD" and is created under the db2inst1 instance on server computer Host1 (tcp/ip hostname Host1). A schema name is used to uniquely identify a tools catalog within a given database. For the purposes of this example, assume the schema name is "CCADMIN".
    2. The instance db2inst1 is setup for TCP/IP communications using port number 50000 by using:
         db2set -i DB2 DB2COMM=TCPIP
         db2 update dbm cfg using svcename xdb2inst
         db2stop
         db2start
    3. The xdb2inst service name is defined in /etc/services. That is, in services you will find a line:
         xdb2inst1     50000/tcp     #connection port for the DB2 instance db2inst1
    4. The tools catalog is created using the CREATE TOOLS CATALOG command. This will create the tools catalog tables and views with a schema name corresponding to the catalog name in the specified database. The DB2 administration server configuration parameters are automatically updated and the scheduler is enabled and started.
    5. Assume that the SMTP server used for e-mail notifications is on computer Host2 (tcp/ip hostname Host2). This information is then specified to the DB2 administration server using:
         db2 update admin cfg using smtp_server Host2
      This might be done during the installation process. If it is done later, it needs to be manually specified to the DAS using a DB2 Version 8 CLP command as shown above.
    6. The IBM Software Developer's Kit for Java (SDK) Version 1.3.1 on AIX is installed under /sqllib/java/jdk. This should be already specified to the DAS. It can be verified, and set if necessary, using:
         db2 update admin cfg using jdk_path /sqllib/java/jdk
  • An example AIX client setup.
    1. Assume that the Control Center is running on client computer C1 (tcp/ip hostname C1).
    2. The DAS is cataloged as an administration server node in the local node directory using either the Configuration Assistant or the Control Center by using:
         db2 catalog admin tcpip node Host1 remote Host1 system Host1 
           ostype AIX
    3. If the Task Center is started and the system Host1 is selected, the Task Center attempts to find the tools catalog database in the local directory. (The Control Center could be used in place of the Task Center.) If not found, it attempts to catalog the node and database using:
         db2 catalog tcpip node unique-node-name 
           remote Host1 server 50000
           remote_instance DB2 system Host1 ostype AIX
         db2 catalog db CCMD as unique-db-alias at node unique-node-name
      If the automatic cataloging is unsuccessful, the database can be cataloged using the Configuration Assistant or the Control Center. The database will then be recognized and used by the Task Center.