For Db2 databases, you can use the conventional method of database creation, using ODBC DSNs, as detailed for the other supported database types; but due to the Db2 architecture, it is preferable to create the databases ahead of time, using an SQL script file.
dbfhadmin -script -type:region -provider:db2 -name:<es-name> -file:<script-name.sql> [-existdb:<db-name>|-db:<db-name>]
where <es-name> is the name of the intended enterprise server region, which must be 8 characters or less (a Db2 restriction).
The two mutually exclusive optional parameters that you can specify determine where the database is to be created: if the region database is to be within an existing Db2 database (for example, you may have one database that holds all datastores, region databases, and a cross-region database), use the -existdb option; to create a new Db2 database, use the -db option to specify the name of the database. If you omit both options, a new database with a default name will be created - the default name for a region database is the value given for the -name option.
dbfhadmin -script -type:crossregion -provider:db2 -file:<script-name.sql> [-existdb:<db-name>|-db:<db-name>]
The two mutually exclusive optional parameters that you can specify determine where the database is to be created: if the cross-region database is to be within an existing Db2 database that does not already contain a cross-region database, use the -existdb option; to create a new Db2 database, use the -db option to specify the name of the database. If you omit both options, a new database with a default name will be created - the default name for a cross-region database is $XREGN$.
dbfhadmin -createdb -file:<script-name.sql> -type:region -provider:db2
where <script-name.sql> is the name of the script file that was created in an earlier step.
dbfhadmin -createdb -file:<script-name.sql> -type:crossregion -provider:db2
Next, you must create or edit a configuration file, so that it contains entries to the region and the cross-region databases.