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.
- Go to <IBM ADDI Installation Folder>\IBM Application Discovery Build Client\Bin\Release\DBScripts and open DB2Z_CreateObjects.sql by using a text editor.
- Locate and set the following parameters in the entire script.
Note: The names of the database, schema, path, and function path must have a maximum length of 8 characters. Special characters cannot be used.
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'
- Run the script.
- After you create a Db2 database and schema, you can attach it to a new created project. For more information, see Creating a project.
The desired Db2 database is created.