HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How do you generate the DDL that created a DB2 LUW database?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
theyoucreatedddldb2luwgeneratedatabasethathow

Problem

There are various options for db2look you can use to see the DDL for just about every object in the database except the command that created the database itself. Is there any way with db2look, or perhaps with some other system command, where you can see the exact command structure that created a database?

Solution

The minimum requirement is to have DB2 10.1.4 or DB2 10.5 installed.


-createdb: Generate the CREATE DATABASE command that was used to create the source database

db2look -d sample -createdb

Context

StackExchange Database Administrators Q#71399, answer score: 2

Revisions (0)

No revisions yet.