WebSphere Message Brokers
File: ah14442_
Writer: Laura Cowen

Task topic

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

Connecting to a database from Windows

This topic describes how to connect to supported databases from Windows®.

Configure an ODBC data source using the ODBC Data Source Administrator:
  1. Click Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC).
  2. Click the System DSN tab.
When you define a new data source, select the appropriate driver for your database and complete the dialog that is displayed. Refer to your relevant database product documentation for more information.

Setup considerations specific to WebSphere Message Broker are described below for the supported databases.

The Default Configuration wizard and the database commands to create a broker, or a database, on Windows automatically create the ODBC data source names (DSNs) for you.

DB2® UDB
When you define a data source for DB2 UDB you must choose the driver:
  • IBM DB2 ODBC DRIVER
  1. Enter the data source name (DSN) and description.
  2. Select the correct database alias from the list.
You must register the data source as a system data source.
You might find it easier to use the Configuration Assistant:
  1. Open the DB2 Configuration Assistant.
  2. Right-click the database. Select Change Database.
  3. Select Data Source.
  4. Select Register this database for ODBC. Select the system data source option.
  5. Click Finish.
  6. The Test Connection dialog opens automatically and you can test the various connections.
Informix® Dynamic Server
When you define a data source for Informix Dynamic Server, choose the driver:
  • IBM INFORMIX ODBC DRIVER
Complete these steps to configure the driver:
  1. On the Connection tab, specify:
    • The Informix server name.
    • The machine host name.
    • The Informix network service name (as defined in the services file).
    • The network protocol (for example, olsotcp).
    • The Informix data source name.
    • The user identifier to access the data source within.
    • The password for that user identifier.
  2. Click Apply.
  3. Click Test Connection to check your supplied values.
  4. Click OK to finish.
Microsoft® SQL Server
When you define a data source for Microsoft SQL Server you must choose the driver:
  • SQL Server
The driver level must be Version 3.60, or later.
  1. Specify a name and description.
  2. Select the correct server from the list.
Oracle
When you define a data source for Oracle, choose the driver:
  • MQSeries DataDirect Technologies 5.20 32-BIT Oracle

The ODBC Oracle Driver Setup dialog opens.

Complete these steps to configure the driver:
  1. On the General tab:
    1. Enter the DSN name, description, and server name (where the server name is the "Service Name" that resolves to a "Connect Descriptor", for example through a mapping in the TSNAMES.ORA file).
    2. Select the appropriate Oracle client version from the list.
  2. On the Advanced tab:
    1. Select Enable SQLDescribeParam.
    2. Select Procedure Returns Results. The resultant ODBC definition in the Windows registry has a string value called ProcedureRetResults with the value 1.
  3. Click Start > Run.
  4. Type REGEDIT in the Open field.
  5. Click OK.
  6. Use REGEDIT to navigate to the correct location. Create a new registry subkey for each of your DSNs that reference an Oracle database.
    HKEY_LOCAL_MACHINE
        SOFTWARE
            ODBC
                ODBC.INI
  7. Click OK to close ODBC Data Source Administrator.
  8. Right-click DSN. Select New > String Value.
  9. Specify WorkArounds for the string.
    1. Right-click WorkArounds.
    2. Select Modify.
    3. Type the data value 536870912.
Sybase Adaptive Server Enterprise
When you define a data source for Sybase Adaptive Server Enterprise, choose the driver:
  • MQSeries DataDirect Technologies 5.20 32-BIT Sybase Wire Protocol
Complete these steps to configure the driver:
  1. Enter the DSN name, description, and network address of the server (for a description of the format of this address, see the explanation for NetworkAddress= in odbc.ini sample file).
  2. Select Enable Describe Parameter. This parameter is on the Advanced tab.
  3. Ensure the Prepare Method setting is 1 - Partial. This parameter is on the Performance tab.
  4. Use REGEDIT to navigate to the correct location. Create a new registry subkey for each of your DSNs that reference an Sybase database.
    HKEY_LOCAL_MACHINE
        SOFTWARE
            ODBC
                ODBC.INI
  5. Right-click the DSN, and select New > String Value. Specify SelectUserName for the string, and set the value to 1.
You have now configured your ODBC data source names on Windows.

Next:
You must configure the environment for issuing console commands, and for running the broker, so that the broker can access the required database libraries. For more information, see Setting your environment to access databases.

Related tasks
Creating a DB2 database on Windows
Changing the Database Heap Size on DB2 broker 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:11

ah14442_ This topic's URL is: