Creating a DB2 database on Windows®

Use the mqsicreatedb or the DB2® Control Center to create a DB2 database.

When you create a broker, you specify the user name and password that are used to connect to the broker database. The process of creating a broker creates the necessary broker tables in the user's schema within the broker database if the tables do not already exist. DB2 authenticates the user name by using the operating system's user management; you do not have to define the user name to DB2 itself.

Using the mqsicreatedb command

To create a database by using the mqsicreatedb command, enter the command at the command line for each database that you want to create, specifying the appropriate parameters. You must provide a user name and password that is known to DB2. Specify that you want to create a DB2 database (not a Derby database).

For more information about these and other parameters, and for examples of command use, see the mqsicreatedb command.

Using the DB2 Control Center

To create a database by using the DB2 Control Center:
  1. Start the DB2 Control Center by clicking Start > Programs > IBM DB2 > General Administration Tools > Control Center
  2. Expand All Systems in the object tree in the DB2 Control Center until you find Databases.
  3. Right-click Databases and click Create Database > Standard.
  4. 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.
  5. Click Done.
  6. When you have completed these steps for every database you create, click OK.
  7. Increase the database heap size to ensure that it is sufficient for the broker. This task is described in Changing the database heap size on DB2 broker databases.

Using other DB2 options

If you prefer, you can use any other method supported by DB2 to create a database (including command line or batch files); refer to the DB2 documentation for details of how to do this.

If you use the DB2 command line to create the databases, you must bind the db2cli package to the database. You do not have to do this if you used the DB2 Control Center wizard, the mqsicreatedb command, or if you created the broker with the Default Configuration wizard.

To bind the package to the database:

  1. Open a DB2 Command Line Processor window.
  2. Connect to the broker database using the following command:
    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 quotation marks.
    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.
Next: If you have been following the instructions in Configuring broker databases, the next task is Changing the database heap size on DB2 broker databases.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009. All Rights Reserved.
Last updated : 2009-01-07 15:40:29

ah14470_