38 DB2 Deployment Guide
This command is used to export configuration profile:
db2cfexp cf.exp template
This command is used to import a configuration profile:
db2cfimp cf.exp
The file generated by db2cfexp is very similar to the one generated by the DB2
Configuration Assistant.
Database configuration
When deploying DB2 server, you might want to configure not only the instance
but also the databases. The configuration profile contains only instance level
information. There is no database configuration included. Another tool in DB2
called db2look is suitable to complete this job. db2look can extract the DDLs
from an existing database as well as the database configurations and the registry
variables. The generated DDLs are normally used to create tables, views, and
constraints in order to build another similar or identical database as the current
one. Chapter 5, “Deploying pre-configured databases” on page 213 covers this
topic in further detail.
Table 2-2 illustrates the command line options most helpful to the server
deployment.
Table 2-2 db2look command options
For example, issue the following command to extract the database
configurations for the database SAMPLE and the registry variables, then output
to a file named sample.ddl:
db2look -d sample -f -o sample.ddl
Note: If there are connectivity entries (database or node) existing with the
same name, they will be replaced with the new definitions imported by
db2cfimp.
Option Description
-d Specify database name.
-f Specify to extract database configuration parameters and registry variables.
-o Specify the name of output file. If not specified, the output is written to
standard output.