Skip to content

Set ODBC connection to DB2 on Win2008R2

October 7, 2013

In this post I describe how to install the IBM DB2 ODBC driver on Windows Server 2008 R2 SP1 and how to configure a data source to connect to a DB2 database.

Environment

Client OS: Windows Server 2008 R2 SP1 64b
Database Host OS: AIX 6.1
RDBMS: DB2 9.7

Procedure

    1. Download the IBM DB2 ODBC driver from the IBM download website (You only need the ODBC driver, not the complete client).
    2. Unzip the ODBC driver on the local machine, for example, in C:/Programs Files/IBM.
    3. Register the driver (run the Command Prompt as Administrator).

      1. Open ODBC data source administrator

        1. Add a new data source

          1. Create the db2dsdrivercfg with the minimum DSN and database information

            1. Select “IBM DATA SERVER DRIVER for ODBC” from the diver list and press Finish

            1. Enter the Data source name, it is recommend to be the same as the database name, and the description and press on the button “Add”

            2. You do not need to add any parameter, need to get in there in order to activate the button OK of the “ODBC IMB Driver – Add” dialog box.
            3. Close the “CLI/ODBC setting” dialog box.
            4. Click on “OK” on the ODBC IBM DB2 Driver – Add” dialog box.

               

            Test connectivity

            1. In the ODBC data source manager, select the new data sources and click on “Configure”.

            • Enter the userid and password of the DB2 user and click on “Connect”.

              If connectivity is successful, you will receive a confirmation message.

            Your ODBC data source for DB2 is ready to use.

            Advertisements

            From → ODBC

            Leave a Reply

            Fill in your details below or click an icon to log in:

            WordPress.com Logo

            You are commenting using your WordPress.com account. Log Out / Change )

            Twitter picture

            You are commenting using your Twitter account. Log Out / Change )

            Facebook photo

            You are commenting using your Facebook account. Log Out / Change )

            Google+ photo

            You are commenting using your Google+ account. Log Out / Change )

            Connecting to %s

            %d bloggers like this: