Enabling ODBC connections to the databases

Set up the resources and environment that the broker needs to connect to broker and user databases with ODBC.

The broker uses Open Database Connectivity (ODBC) to connect to databases. You must define ODBC data source names (DSNs) for the broker database on each computer that hosts a broker. You must also define ODBC DSNs for any user databases that are accessed by message flows that are deployed to the broker. At any one time, multiple connections can use the same DSN definition.

z/OS platform On z/OS® systems, see Data sources on z/OS for information about enabling connections to databases. You do not have to follow the tasks described in this section.

Linux platform On Linux® on POWER™ and Linux on System z®, DB2® is the only supported database manager; the broker and message flows connect to the databases directly using the DB2 supplied driver and do not use a driver manager. The DB2 alias is used as the DSN.

On distributed systems, when you define the DSNs, consider the following two factors that determine whether you must define a 32-bit DSN for the database, a 64-bit DSN, or both:
  • Whether the execution group and the database instance operate in 32-bit or 64-bit mode
  • Whether you plan to globally coordinate message flow transactions
Linux platformUNIX platform On Linux and UNIX® systems, DSNs are defined in a plain text file on the computer that hosts the broker:
  • Define 32-bit DSNs in the odbc.ini file.
  • Define 64-bit DSNs in the odbc64.ini file.

Set the ODBCINI environment variable to point to the .ini file that contains the DSN that is defined for the broker to connect to the broker database; the file is odbc.ini on all platforms except HP-UX on Itanium where it is odbc64.ini. If you define 64-bit DSNs in odbc64.ini on 64-bit platforms, you must also set ODBCINI64 to point to odbc64.ini.

For more information about the 32-bit and 64-bit considerations, see Broker database connections and User database connections.

When you have defined the appropriate DSNs, you must also configure the environment so that the broker can access the correct database libraries; Setting your environment to support access to databases describes this task.

To enable connections on distributed systems:

  1. Define the ODBC DSNs according to your platform:
    Windows platform On Windows®:
    Windows provides only 32-bit support. Follow the instructions in Connecting to a database from Windows systems.
    On Linux on x86:
    Linux on x86 provides only 32-bit support. Follow the instructions in Connecting to a database from Linux and UNIX systems.
    Linux platformUNIX platform On other Linux and UNIX systems:
    Depending on your broker configuration, for each database you might need to define a 32-bit ODBC DSN, a 64-bit ODBC DSN, or both.

    Use the following tables to check which DSNs you must define, and follow the links for the appropriate instructions.

      32-bit execution group 64-bit execution group

    32-bit broker

    All platforms except HP-UX on Itanium

    Broker database: 32-bit

    User database: 32-bit

    Broker database: 32-bit and 64-bit

    User database: 64-bit

    64-bit broker

    HP-UX on Itanium only

    Not possible

    Broker database: 64-bit

    User database: 64-bit

    The following tables provide links to topics for connecting databases when you are using global coordination and a 64-bit queue manager. All WebSphere® MQ Version 6 queue managers on 64-bit platforms run in 64-bit mode.
      32-bit execution group 64-bit execution group

    32-bit broker

    All platforms except HP-UX on Itanium

    Broker database: 32-bit and 64-bit

    User database: 32-bit and 64-bit

    Broker database: 32-bit and 64-bit

    User database: 64-bit

    64-bit broker

    HP-UX on Itanium only

    Not possible

    Broker database: 64-bit

    User database: 64-bit

    The following table provides links to topics for connecting databases when you are using global coordination and a 32-bit queue manager. All WebSphere MQ Version 6 queue managers on 32-bit platforms run in 32-bit mode. All WebSphere MQ Version 5.3 queue managers run in 32-bit mode.
      32-bit execution group 64-bit execution group

    32-bit broker

    All platforms except HP-UX on Itanium

    Broker database: 32-bit

    User database: 32-bit

    Not possible

    64-bit broker

    (HP-UX on Itanium only)

    Not possible

    Not possible

    You have now configured the ODBC DSN for your broker database and the ODBC DSNs for any user database.
  2. Configure the environment for issuing console commands and for running the broker so that it can access the required database libraries. For more information, see Setting your environment to support access to databases.
You have now enabled the broker to make connections to the broker database and to any user database.
Next: If you have been following the instructions in Configuring broker and user databases, the next task is Using retained publications with a Sybase database.
Related concepts
Broker database connections
User database connections
Related tasks
Configuring broker and user databases
Related reference
Support for 32-bit and 64-bit platforms
Supported databases
odbc.ini sample file
odbc64.ini sample file
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:22:01

ah14440_