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).
Additionally, there are two (mutually exclusive) optional parameters that you can specify: if you are creating the region database 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; if you are creating 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>]
Cross-region database names are hard-coded to $XREGN$.
Additionally, there are two (mutually exclusive) optional parameters that you can specify: if you are creating the cross-region database to be within an existing Db2 database that does not already contain a cross-region database), use the -existdb option; if you are creating 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.