How to create separate DDL file for create tables and constraints in DB2 -
for db2 10.1 luw, want create ddl script contains create table statements , create ddl script contains constraints.
the aim automate creation of database scripts existing database , not rely on sql guis data studio, sqldbx , razorsql. ideally trigger actions command line can generate create dll schema, insert data statements each table in schema , generate constraints ddl. insert data without dealing constraints performance , means not restricted running inserts in specific order.
unfortunately cannot use db2move , thought db2look work ddl, cannot find syntax this. can db2look or there else out there help?
thanks
db2look generates ddl script existing db , objects.
for example, 1. getting ddl db
db2look -d <dbname> -a -e -l -x -o db2look.out
to ddl table
db2look –d dbname –e –z schema_name –t table_name -o output_file -nofed
Comments
Post a Comment