WebSphere Message Brokers
File: ah14480_
Writer: Kate Hostler

Task topic

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

Creating a DB2 database on Linux and UNIX systems

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.

To create a DB2 database on Linux or UNIX:

  1. Log on as root.
  2. Create a database instance. Use the commands shown here for guidance for the different platforms.
    1. On AIX:
      /usr/lpp/db2_08_01/instance/db2icrt -u fence_userID username
    2. On Linux, Solaris, or HP-UX:
      /opt/IBM/db2/V8.1/instance/db2icrt -u fence_userID username

    The username that you specify on this command determines the nominated owner of the database instance. You are recommended to log on as this user whenever you perform any actions against the database instance (for example, creating or modifying a database). The command examples that are used in this help assume that you are logged on as username, and use the tilde (~) character to indicate this user ID in the DB2 commands issued.

    If you are not logged on as the user that owns the database instance, you must modify the commands shown to specify explicit ownership by specifying the owner user ID username following the ~ character wherever it is used in the examples.

    The fence_userID refers to the user ID under which stored procedures execute. You can specify a different ID to the instance owner ID for the database for extra security and protection, which is achieved because the stored procedure runs under a different ID, and therefore in a different process, to the database instance itself.

    For further explanation of database ownership, refer to the DB2 library, which is available on the Web.

  3. Log on as username
  4. Create a database (in this example called WBRKBKDB) using the following commands (on some platforms, an explicit path name is required).
    You must insert a space between the starting period and the tilde character in the first command shown here:
    . ~/sqllib/db2profile
    db2start
    db2 create database WBRKBKDB
    db2 connect to WBRKBKDB
    db2 bind ~/sqllib/bnd/@db2cli.lst grant public CLIPKG 5
  5. 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.
  6. If you are using a 64-bit DB2 instance, add <DB2 instance directory>/sqllib/lib32 to the start of the library search path environment variable.
  7. If you are using 32-bit execution groups, set the environment variable MQSI_LIBPATH32 to include the 32-bit database libraries.

When you issue the command that creates the broker, tables are created within the database to hold the information required.

Related tasks
Configuring databases
Enabling connections to the databases
Changing the Database Heap Size on DB2 broker databases
Authorizing access to the databases
Related reference
Supported databases
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

ah14480_ This topic's URL is: