How to Install and Configure DB2 ODBC Driver


1 Download and Install

Download DB2 CLI ODBC Driver:

for x86 (32bit):*&platform=Windows+32-bit,+x86&function=fixId&fixids=*odbc_cli*&includeSupersedes=0

for x64 (64bit):*&platform=Windows+64-bit,+x86&function=fixId&fixids=*odbc_cli*&includeSupersedes=0


Uncompress the zip file to a folder, for example: F:\work\clidriver .

In folder F:\work\clidriver\bin, right click on file db2.ini -> “Properties” -> uncheck the “read only” attribute.

update: in recent version, you need create a “db2dsdriver.cfg” file in path “F:\work\clidriver\cfg”, content like this:

<database name=”sample” host=”″ port=”50000″>
<parameter name=”CurrentSchema” value=”sample”/>
<parameter name=”enableWLB” value=”true”/>
<parameter name=”maxTransports” value=”50″/>
<parameter name=”enableACR” value=”true”/>
<parameter name=”GlobalParam” value=”Value”/>

2 Register ODBC driver
Run “CMD”, if win7, run as Administrator (

F:\work\clidriver\bin>db2oreg1.exe -i

Add “F:\work\clidriver\bin\” to your system PATH .

3 Create a new ODBC Data Source Name (DSN) using the ODBC Driver Manager.

The ODBC Driver Manager is in the Windows Control panel -> Administrative tools.

Add a “User DSN”

select “IBM DB2 DRIVER for ODBC – F:/work/clidriver” as driver.


next, set “Data source name”

In “Database alias” row, click “Add”.

To “Advanced settings” tab, click “Add”.

add “Hostname”.

add “Port”, “Database”, and “Protocol”.

To “Data Source” tab, input “User ID” and “Password”.

Click “OK”.

4 Test DSN
Select saved “DSN”, click “Configure”.

Click “Connect” to test.

Some DB2 tools you can try: