Creating Db2 Database Using DDL Script

About this task

A Data Definition Language (DDL) script can be used to create a Db2® database. The DB2Z_CreateObjects.sql DDL script is located in the <IBM ADDI Installation Folder>\IBM Application Discovery Build Client\Bin\Release\DBScripts folder.

Procedure

  1. Go to <IBM ADDI Installation Folder>\IBM Application Discovery Build Client\Bin\Release\DBScripts and open DB2Z_CreateObjects.sql by using a text editor.
  2. Locate and set the following parameters in the entire script.
    • CREATE DATABASE <enter an appropriate name for the database>
    • SET CURRENT SCHEMA = 'enter an appropriate name for the schema'
    • SET CURRENT PATH = 'enter an appropriate name for the path'
    • SET CURRENT FUNCTION PATH = 'enter an appropriate name for the function path'
    Note: The names of the database, schema, path, and function path must have a maximum length of 8 characters. Special characters cannot be used.
  3. Run the script.
  4. After you create a Db2 database and schema, you can attach it to a new created project. For more information, see Creating a project.

Results

The desired Db2 database is created.