db2 extract ddl db2look - ghdrako/doc_snipets GitHub Wiki

 db2look-d DBname [-u Creator] [-s] [-g] [-a] [-t Tname1 Tname2 ... TnameN]
[-P] [-o Fname] [-i userID] [-w password]
the db2look [-h]

-D: database name: This must be specified

db2look -d DEPARTMENT-u walid -e -o db2look.sql

Extraction of the DDL of the DEPT table

db2look -d MY_DDBB -t DEPT -a -e -x -o FILE_OUT.txt

DDL extraction of the objects in my schema:

db2look -d MY_DDBB -a -e -x -o FIlE_OUT.txt
db2look -d dpc1vt -z ebkpa -t umowy_osoba -e -i #019236 -w lala1234 -o db2look.sql

db2look -d duc7vt -z ebkpa -t umowy_osoba -e -i "#019236" -w kepartur -o db2look.sql
lub 

db2 "describe select * from ebkpa.umowy_osoba"