Usar db2look para crear DDL de una tabla en concreto, o un esquema completo

db2look – Create DDL for table or full schema Oscar_paredes Wed, 12/18/2019 - 16:41

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!