This topic describes how to create tables for scheduler on DB2
for iSeries databases, using data definition language (DDL) or structured
query language (SQL) files.
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
- Start a QShell session by running the following command from a
CL command line:
STRQSH
- 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.
- Copy the following scripts to this new directory:
%WAS_HOME%/scheduler/createSchemaDB2iSeries.ddl
%WAS_HOME%/scheduler/dropSchemaDB2iSeries.ddl
- 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.
- Use the iSeries Navigator to create the database files on your
iSeries server.
- Start iSeries Navigator.
- Expand the iSeries icon to locate the system where you want
to create the database files.
- Expand Database, and right-click the system database.
- Select Run SQL Scripts.
- Select File > Open.
- Navigate to the createSchemaDB2iSeries.ddl file in
your profile directory.
- Select Run > All.
- Select View > Job Log to verify that the tables
were created.
- 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.