WebSphere Message Brokers
File: ah14470_
Writer: Kate Hostler

Task topic

This build: July 31, 2007 21:30:15

Creating a DB2 database on Windows

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

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 using operating system user management; you do not have to define the user name to DB2 itself.

  1. If you want to create a database with the mqsicreatedb command, enter the command at the command line, specifying the appropriate parameters. You must provide a user name and password that is known to DB2. Indicate that you want to create a DB2 database (not a Derby database). For more information about these and other parameters, refer to the mqsicreatedb command.

    If you want to use the Control Center instead of the mqsicreatedb command, complete step 2.

  2. Start the DB2 Control Center. For each database you want to create:
    1. Expand All Systems in the object tree in the DB2 Control Center until you find Databases. Right-click Databases and click Create Database > Standard.
    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. This task is described in Changing the Database Heap Size on DB2 broker 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, 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.

  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 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.
Related concepts
Using Derby databases on Windows
Related tasks
Configuring databases
Enabling connections to the databases
Changing the Database Heap Size on DB2 broker databases
Authorizing access to the databases
Using the Default Configuration wizard
Related reference
Supported databases
mqsicreatedb command
mqsideletedb command
mqsichangedbimgr command
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:30:15

ah14470_ This topic's URL is: