DB2 Export DDL to File

Export the DDL of a DB2 database using db2look.

Open the CLP.

db2look -e -d <database> -z <schema> -t table(1),…,table(n) -o <path_to_file.sql>

Use db2look to recreate a database when debugging issues with DB2 databases.

References

https://www.ibm.com/support/knowledgecenter/search/db2look?scope=SSEPGG_10.5.0

https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.trb.doc/doc/c0020703.html

 

Author: codejago