Extract DB2 create database ddl using db2look and -createdb switch

11 December,2015 by Jack Vamvas

Question: How can I extract the ddl for CREATE DATABASE ? It seems like you can extract the full range of database object DDLs, but I can’t extract the database ddl

Answer: You can extract the CREATE DATABASE ddl. The minimum requirement is to have DB2 10.1.4 or DB2 10.5 installed

You’re probably familiar with the dblook utility, used for extracting database object DDLs. The DDLs are used to duplicate the objects into a fresh database , source control or to Compare DDL of 2 databases in DB2

A new parameter was added called –createdb.

An example of using the db2look –createdb parameter



db2look -d MYDB -createdb -o /tmp/mydb.sql

 Read More on db2look and DDL

Create a DDL on an existing DB2 table

DB2 How To get View definition - DBA DB2

List DB2 table columns and unique constraints - DBA DB2

Author: Jack Vamvas(http://www.dba-db2.com)


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on Extract DB2 create database ddl using db2look and -createdb switch

Comments are moderated, and will not appear until the author has approved them.

dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright