Creating DB2 tables for schedulers

Create tables for scheduler on DB2® databases using data definition language (DDL) or structured query language (SQL) files.

Before you begin

This task requires you to configure a database and make it available. Refer to the Creating DB2 databases for schedulers topic for more information.

About this task

To create tables for scheduler on DB2 databases, using data definition language (DDL) or structured query language (SQL) files, use these steps.

Procedure

  1. Open a DB2 command-line window.
  2. Verify that you have administrator rights for the database system.
  3. Create the table space and schema.
    1. Analyze the results of your experiences during development and system testing. The size of your database depends on many factors. If possible, distribute table space containers across different logical disks, and implement an appropriate security policy. Consider the performance implications of your choices for buffer pools and log file settings.
    2. Using a text editor, edit the following scripts according to the instruction at the beginning of each file.
      Note: When setting the table prefix, capitalize all characters.
      %WAS_HOME%\Scheduler\createTablespaceDB2.ddl, %WAS_HOME%\Scheduler\createSchemaMod1DB2.ddl, %WAS_HOME%\Scheduler\dropSchemaMod1DB2.ddl, and %WAS_HOME%\Scheduler\dropTablespaceDB2.ddl. 
    3. Verify that you are attached to the correct instance. Check the environment variable DB2INSTANCE.
    4. To connect to the database, scheddb, for example, and enter the command:
      db2 connect to scheddb
    5. Create the table space. Enter the following command:
      db2 -tf createTablespaceDB2.ddl
      Verify that the script output contains no errors. If there were any errors, you can drop the table space using the following script:
      dropTablespaceDB2.ddl
    6. To create the schema (tables and indices), in the DB2 command line processor, enter the command db2 -tf createSchemaMod1DB2.ddl. Verify that the script output contains no errors. If there were any errors, you can use the following file to drop the schema:
      dropSchemaMod1DB2.ddl
    7. Verify that the DB2_RR_TO_RS DB2 flag is set to YES to avoid deadlocks. Restart the DB2 instance to activate the change, if needed.

Results

The DB2 tables and schema for the scheduler exist.

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:21
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsch_dbtuadmin
檔名:tsch_dbtuadmin.html