June 2018
Intermediate to advanced
478 pages
10h 52m
English
The db2look tool command generates the data definition language statements for a specific object type. This can be used to reproduce the database objects into another database, for example copying a production database schema into a test system. The basic command syntax is this:
db2look -d [DBName] [-e] [-z SchemaName] [-t TableNames] [-v ViewNames]
If you want to extract a definition of a database, you can run the following command:
db2look -d sample -createdb
-- No userid was specified, db2look tries to use Environment variable USER
-- USER is: DB2INST1
-- This CLP file was created using DB2LOOK Version "11.1"
-- Timestamp: Wed 23 May 2018 04:38:15 AM EDT
-- Database Name: SAMPLE
-- Database Manager ...Read now
Unlock full access