[IBM i]

Creating DB2 for iSeries tables for schedulers

Create tables for scheduler on DB2® for iSeries 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. See the " Creating DB2 for iSeries databases for schedulers" topic for more information.

About this task

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

Procedure

  1. Start a QShell session by running the following command from a CL command line:
    STRQSH
  2. Create a new IFS directory under your profile directory:
    mkdir profile_root/scheduler
    Where profile_root is the fully qualified path of the directory that contains your profile.
  3. Copy the following scripts to this new directory:
    %WAS_HOME%/scheduler/createDB2iSeriesSchema.ddl
    %WAS_HOME%/scheduler/dropSchemaDB2iSeries.ddl
    
  4. Using a text editor, edit these scripts in the new directory. Replace all occurrences of @TABLE_PREFIX@ with <collection_name>, <table_prefix> where <collection_name> is the name of the collection that will be used to store the database files and is the collection that was created in the " Creating DB2 for iSeries databases for schedulers" topic. The <table_prefix> precedes each table name.
  5. Use the iSeries Navigator to create the database files on your iSeries server.
    1. Start iSeries Navigator.
    2. Expand the iSeries icon to locate the system where you want to create the database files.
    3. Expand Database, and right-click the system database.
    4. Select Run SQL Scripts.
    5. Select File > Open.
    6. Navigate to the createDB2iSeriesSchema.ddl file in your profile directory.
    7. Select Run > All.
    8. Select View > Job Log to verify that the tables were created.
  6. Execute the following command to change the owner for the new database files to QEJBSVR:
    CHGOBJOWN OBJ(*ALL) OBJTYPE(*ALL) NEWOWN(QEJBSVR)
    

Results

The DB2 for iSeries tables and schema for the scheduler exist.

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: March 5, 2017 17:35
File name: tsch_dbtuadmini.html