How to make a db2 structure dump

When you want to reverse engineer an existing DB2 database into DeZign for Databases you can import a database structure dump (sql ddl file). A dump will contain SQL statements to create the table and/or populate the table.

If you use DB2 UDB, then you can use the DB2Look utility. DB2Look is a handy tool that can be invoked from the command prompt and the Control Center. DB2Look can extract the database definition language (DDL) from database objects.

DB2look -d -e -o alltables.sql

If you run the Db2look tool on client, then use:

DB2look -d -e -o alltables.sql -i userid -w passwd

You can now run ImportER Scripts with alltables.sql as the input file.

Please note that ImportER Scripts only needs a dump of the table structures. The data will be ignored. Also note that default a unicode text file/script is generated by SQL Server. Please use WordPad (or another utility) to make it/save as a normal DOS text file. If the imported SQL script is not a normal text file, the ImportER will not find any table.


Learn Get products and technologies
  • Build your next data model with DeZign for Databases trial software, available for download directly from Datanamic's download section.