Db2look is an utility to extract the definition of database objects. It also allows some really interesting statistics to extract objects for export to other test environments / integration plans and get the same access to objects.
In this article we will see more frequent usefulness.
DDL extraction of the objects in my schema:
db2look -d MI_BBDD -a -e -x -o FICHERO_SALIDA.txt
Extraction of the DDL of the DEPT table:
db2look -d MI_BBDD -t DEPT -a -e -x -o FICHERO_SALIDA.txt
To include statistics to have to use the “-m” option.
I hope that you find it useful!