Connecting to a database from Windows systems

To enable a broker to connect to a database, define the ODBC data source name (DSN) for the database.

Configure an ODBC data source using the ODBC Data Source Administrator:
  1. Click Start > Control Panel > Administrative Tools > Data Sources (ODBC).
  2. Click the System DSN tab and click Add.
  3. Complete the steps in the following sections for the databases that you are working with.

    If you need more information about a particular database product, see the product-specific documentation.

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
To define a data source for DB2 UDB:
  1. Select the driver IBM DB2 ODBC DRIVER.
  2. Enter the data source name (DSN) and description.
  3. Select the correct database alias from the list.
  4. Click Finish to save your definition.
  5. Start of changeClick OK to close the ODBC Data Source Administrator.End of change
You must register the data source as a system data source.
If you prefer, you can use the Configuration Assistant instead of the ODBC Data Source Administrator:
  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
To define a data source for Informix Dynamic Server:
  1. Select the driver IBM INFORMIX ODBC DRIVER.
  2. 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.
  3. Click Apply.
  4. Click Test Connection to check your supplied values.
  5. Start of changeClick OK to close the ODBC Data Source Administrator.End of change
Microsoft® SQL Server
To define a data source for Microsoft SQL Server:
  1. Select the driver SQL Server. The driver level must be Version 3.60, or later.
  2. Specify a name and description.
  3. Select the correct server from the list.
  4. Click Finish to save your definition.
  5. Start of changeClick OK to close the ODBC Data Source Administrator.End of change
Oracle
To define a data source for Oracle:
  1. Select the driver MQSeries DataDirect Technologies 5.00 32-BIT Oracle.

    The ODBC Oracle Driver Setup dialog box opens.

  2. 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.
  3. 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.
  4. Start of changeClick OK to close the ODBC Data Source Administrator.End of change
  5. Click Start > Run.
  6. Type REGEDIT in the Open field and click OK.
  7. In the Registry Editor, navigate to the correct location:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC32.INI
  8. Expand that location, and right-click your DSN entry. Select New > String Value.
  9. Specify WorkArounds for the string name.
    1. Right-click WorkArounds.
    2. Select Modify.
    3. Type the data value 536870912.
  10. Close the Registry Editor.
Sybase Adaptive Server Enterprise
To define a data source for Sybase Adaptive Server Enterprise:
  1. Select the driver MQSeries DataDirect Technologies 5.00 32-BIT Sybase Wire Protocol.
  2. 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 the odbc.ini sample file).
  3. Select Enable Describe Parameter. This parameter is on the Advanced tab.
  4. Ensure the Prepare Method setting is 1 - Partial. This parameter is on the Performance tab.
  5. Click Start > Run.
  6. Type REGEDIT in the Open field and click OK.
  7. In the Registry Editor, navigate to the correct location:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
  8. Expand that location, and right-click your DSN entry. Select New > String Value. Specify SelectUserName for the string, and set the value to 1.
  9. Close the Registry Editor.
You have now configured your ODBC data source names on Windows.

Next: 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 support access to 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, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:22:02

ah14442_