Creating a DB2 database on Windows

Use the DB2 Control Center to create a DB2 database on Windows for the broker or the configuration repository. You can use any other method supported by DB2 (including command line or batch files) if you prefer; refer to the DB2 documentation for details of how to do this.

Start of changeWhen you create a broker or Configuration Manager, you specify the user ID and password that are used to connect to the database. The user ID must be known to the database and must own the tables that are being accessed. When you create the database, ensure that you create them for the right user ID. DB2 authenticates the user ID using operating system user management, you do not have to define the user ID to DB2 itself.End of change

  1. Start the DB2 Control Center.
  2. For each database you want to create:
    1. Expand the Object tree in the DB2 Control Center until you find Databases. Right-click Databases and select Create > Database Using Wizard.
    2. Enter a name and alias for your database. If you have a naming convention for databases, choose a compatible name. The alias name can be the same as the database name. Database names are limited to eight characters. For example, enter WBRKBKDB.
    3. Click Done.
  3. You must increase the database heap size to ensure it is sufficient for the broker or Configuration Manager. This task is described in Customizing DB2 databases.
  4. When you have completed these steps for every database you have created, click OK.

If you use the DB2 command line to create the databases, or if you are using DB2 Version 7.2 plus FixPak 9, you must also bind the db2cli package to the configuration repository or broker database. (You do not have to do this if you used either the Create Database Wizard, or the "Preparing the samples for first use" cheat sheet and the Getting Started configuration wizard.)

  1. Open a DB2 Command Line Processor window.
  2. Connect to the broker database:
    db2cmd db2 CONNECT to <YourBrokerDatabaseName>
  3. Enter the following commands, where c:\ is the drive on which you installed DB2. You must enter your full DB2 installation path; do not use spaces or quotes.
    db2 bind C:\SQLLIB\BND\@db2ubind.lst GRANT PUBLIC 
    db2 bind C:\SQLLIB\BND\@db2cli.lst GRANT PUBLIC 
  4. Repeat the previous two steps for every broker database.
  5. Connect to the configuration repository:
    db2 CONNECT to <YourConfigurationRepositoryName>
  6. Enter the following commands:
    db2 bind C:\SQLLIB\BND\@db2ubind.lst GRANT PUBLIC 
    db2 bind C:\SQLLIB\BND\@db2cli.lst GRANT PUBLIC

If you are creating a DB2 database for a broker, and you deploy message flows that use aggregation, you are recommended to apply row-level locking to the aggregate table in the broker database. See Using aggregation with a DB2 database for instructions on how to do this.

Related tasks
Configuring component databases
Connecting to the databases
Customizing DB2 databases
Authorizing access to the databases

Related reference
Supported databases