+

Search Tips   |   Advanced Search

Create DB2 tables for schedulers

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

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

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

  1. Open a DB2 command-line window.

  2. Verify that we have administrator rights for the database system.

  3. Create the table space and schema.

    1. Analyze the results of the experiences during development and system testing. The size of the 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 the choices for buffer pools and log file settings.

    2. Use a text editor, edit the following scripts according to the instruction at the top of each file.

      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, we 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, we 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.


Related tasks

  • Create DB2 databases for schedulers

  • Data source minimum required settings, by vendor