{"id":496,"date":"2011-08-27T12:05:27","date_gmt":"2011-08-27T12:05:27","guid":{"rendered":"http:\/\/www.withdata.com\/ad\/?p=496"},"modified":"2024-11-05T03:45:35","modified_gmt":"2024-11-05T03:45:35","slug":"how-to-install-and-configure-db2-odbc-driver","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/tips\/how-to-install-and-configure-db2-odbc-driver.html","title":{"rendered":"How to Install and Configure DB2 ODBC Driver"},"content":{"rendered":"<p><strong>1 Download and Install<\/strong><\/p>\n<p>Download DB2 CLI ODBC Driver:<\/p>\n<p>for x86 (32bit):<\/p>\n<p><del datetime=\"2015-02-03T06:20:19+00:00\">https:\/\/delivery04.dhe.ibm.com\/sdfdl\/v2\/sar\/CM\/IM\/04qs9\/0\/Xa.2\/Xb.jusyLTSp44S03o2gwPADMzlDcfeJnsfCE8Y8a4irGv6duELOADVNn04YxvA\/Xc.CM\/IM\/04qs9\/0\/v10.5fp4_nt32_odbc_cli.zip\/Xd.\/Xf.LPR.D1vk\/Xg.7844487\/Xi.habanero\/XY.habanero\/XZ.jdm2CccvOKn3Ld3nwm-Pj62vpeA\/v10.5fp4_nt32_odbc_cli.zip<\/del><\/p>\n<p>https:\/\/www-933.ibm.com\/support\/fixcentral\/swg\/selectFixes?parent=ibm%2FInformation%2BManagement&#038;product=ibm\/Information+Management\/IBM+Data+Server+Client+Packages&#038;release=10.5.*&#038;platform=Windows+32-bit,+x86&#038;function=fixId&#038;fixids=*odbc_cli*&#038;includeSupersedes=0<\/p>\n<p>for x64 (64bit):<\/p>\n<p><del datetime=\"2015-02-03T06:20:19+00:00\">https:\/\/delivery04.dhe.ibm.com\/sdfdl\/v2\/sar\/CM\/IM\/04qs7\/0\/Xa.2\/Xb.jusyLTSp44S03o2gwLvv_gehwZO_FuEKqSjmFO6RZHWDmK3FXWGSKLzrKXQ\/Xc.CM\/IM\/04qs7\/0\/v10.5fp4_ntx64_odbc_cli.zip\/Xd.\/Xf.LPR.D1vk\/Xg.7844482\/Xi.habanero\/XY.habanero\/XZ.tXV1ZzgNXYn-0zygvQ8Qb8WK01k\/v10.5fp4_ntx64_odbc_cli.zip<\/del><\/p>\n<p>https:\/\/www-933.ibm.com\/support\/fixcentral\/swg\/selectFixes?parent=ibm%2FInformation%2BManagement&#038;product=ibm\/Information+Management\/IBM+Data+Server+Client+Packages&#038;release=10.5.*&#038;platform=Windows+64-bit,+x86&#038;function=fixId&#038;fixids=*odbc_cli*&#038;includeSupersedes=0<\/p>\n<p>&nbsp;<\/p>\n<p>Uncompress the zip file to a folder, for example: F:\\work\\clidriver .<\/p>\n<p>In folder F:\\work\\clidriver\\bin, right click on file db2.ini -&gt; &#8220;Properties&#8221; -&gt; uncheck the &#8220;read only&#8221; attribute.<\/p>\n<p><strong>update<\/strong>: in recent version, you need create a &#8220;db2dsdriver.cfg&#8221; file in path &#8220;F:\\work\\clidriver\\cfg&#8221;, content like this:<\/p>\n<p>&lt;configuration&gt;<br \/>\n&lt;databases&gt;<br \/>\n&lt;database name=&#8221;sample&#8221; host=&#8221;192.168.1.102&#8243; port=&#8221;50000&#8243;&gt;<br \/>\n&lt;parameter name=&#8221;CurrentSchema&#8221; value=&#8221;sample&#8221;\/&gt;<br \/>\n&lt;wlb&gt;<br \/>\n&lt;parameter name=&#8221;enableWLB&#8221; value=&#8221;true&#8221;\/&gt;<br \/>\n&lt;parameter name=&#8221;maxTransports&#8221; value=&#8221;50&#8243;\/&gt;<br \/>\n&lt;\/wlb&gt;<br \/>\n&lt;acr&gt;<br \/>\n&lt;parameter name=&#8221;enableACR&#8221; value=&#8221;true&#8221;\/&gt;<br \/>\n&lt;\/acr&gt;<br \/>\n&lt;\/database&gt;<br \/>\n&lt;\/databases&gt;<br \/>\n&lt;parameters&gt;<br \/>\n&lt;parameter name=&#8221;GlobalParam&#8221; value=&#8221;Value&#8221;\/&gt;<br \/>\n&lt;\/parameters&gt;<br \/>\n&lt;\/configuration&gt;<\/p>\n<p><strong>2 Register ODBC driver<\/strong><br \/>\nRun &#8220;CMD&#8221;, if win7, run as Administrator (<a href=\"https:\/\/www.withdata.com\/blog\/tips\/how-to-open-elevated-command-prompt-with-administrators-rights-in-windows-7.html\">https:\/\/www.withdata.com\/blog\/tips\/how-to-open-elevated-command-prompt-with-administrators-rights-in-windows-7.html<\/a>)<\/p>\n<p>F:\\work\\clidriver\\bin&gt;db2oreg1.exe -i<\/p>\n<p>Add &#8220;F:\\work\\clidriver\\bin\\&#8221; to your system PATH .<\/p>\n<p><strong>3 Create a new ODBC Data Source Name (DSN) using the ODBC Driver Manager.<\/strong><\/p>\n<p>The ODBC Driver Manager is in the Windows Control panel -&gt; Administrative tools.<\/p>\n<p>Add a &#8220;User DSN&#8221;<\/p>\n<p>select &#8220;IBM DB2 DRIVER for ODBC &#8211; F:\/work\/clidriver&#8221; as driver.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/select-db2-odbc-driver.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-497\" title=\"select-db2-odbc-driver\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/select-db2-odbc-driver.gif\" alt=\"\" width=\"280\" height=\"148\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>next, set &#8220;Data source name&#8221;<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-data-source-name.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-498\" title=\"db2-data-source-name\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-data-source-name.gif\" alt=\"\" width=\"324\" height=\"231\" \/><\/a><\/p>\n<p>In &#8220;Database alias&#8221; row, click &#8220;Add&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-settings.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-499\" title=\"db2-odbc-settings\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-settings.gif\" alt=\"\" width=\"563\" height=\"370\" \/><\/a><\/p>\n<p>To &#8220;Advanced settings&#8221; tab, click &#8220;Add&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-add-parameter.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-500\" title=\"db2-odbc-add-parameter\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-add-parameter.gif\" alt=\"\" width=\"379\" height=\"383\" \/><\/a><\/p>\n<p>add &#8220;Hostname&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-hostname.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-501\" title=\"db2-odbc-hostname\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-hostname.gif\" alt=\"\" width=\"430\" height=\"253\" \/><\/a><\/p>\n<p>add &#8220;Port&#8221;, &#8220;Database&#8221;, and &#8220;Protocol&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-parameters.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-502\" title=\"db2-odbc-parameters\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-parameters.gif\" alt=\"\" width=\"563\" height=\"370\" \/><\/a><\/p>\n<p>To &#8220;Data Source&#8221; tab, input &#8220;User ID&#8221; and &#8220;Password&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-userid-password.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-503\" title=\"db2-odbc-userid-password\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-userid-password.gif\" alt=\"\" width=\"563\" height=\"371\" \/><\/a><\/p>\n<p>Click &#8220;OK&#8221;.<\/p>\n<p><strong>4 Test DSN<\/strong><br \/>\nSelect saved &#8220;DSN&#8221;, click &#8220;Configure&#8221;.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-dsn.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-504\" title=\"db2-dsn\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-dsn.gif\" alt=\"\" width=\"329\" height=\"150\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-test.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-505\" title=\"db2-odbc-test\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-test.gif\" alt=\"\" width=\"563\" height=\"369\" \/><\/a><\/p>\n<p>Click &#8220;Connect&#8221; to test.<\/p>\n<p><a href=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-test-ok.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-518\" title=\"db2-odbc-test-ok\" src=\"https:\/\/www.withdata.com\/wp\/wp-content\/uploads\/2011\/08\/db2-odbc-test-ok.gif\" alt=\"\" width=\"563\" height=\"372\" \/><\/a><\/p>\n<p>Some DB2 tools you can try: <a href=\"https:\/\/www.withdata.com\/db2\/\"> https:\/\/www.withdata.com\/db2\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 Download and Install Download DB2 CLI ODBC Driver: for x86 (32bit): https:\/\/delivery04.dhe.ibm.com\/sdfdl\/v2\/sar\/CM\/IM\/04qs9\/0\/Xa.2\/Xb.jusyLTSp44S03o2gwPADMzlDcfeJnsfCE8Y8a4irGv6duELOADVNn04YxvA\/Xc.CM\/IM\/04qs9\/0\/v10.5fp4_nt32_odbc_cli.zip\/Xd.\/Xf.LPR.D1vk\/Xg.7844487\/Xi.habanero\/XY.habanero\/XZ.jdm2CccvOKn3Ld3nwm-Pj62vpeA\/v10.5fp4_nt32_odbc_cli.zip https:\/\/www-933.ibm.com\/support\/fixcentral\/swg\/selectFixes?parent=ibm%2FInformation%2BManagement&#038;product=ibm\/Information+Management\/IBM+Data+Server+Client+Packages&#038;release=10.5.*&#038;platform=Windows+32-bit,+x86&#038;function=fixId&#038;fixids=*odbc_cli*&#038;includeSupersedes=0 for x64 (64bit): https:\/\/delivery04.dhe.ibm.com\/sdfdl\/v2\/sar\/CM\/IM\/04qs7\/0\/Xa.2\/Xb.jusyLTSp44S03o2gwLvv_gehwZO_FuEKqSjmFO6RZHWDmK3FXWGSKLzrKXQ\/Xc.CM\/IM\/04qs7\/0\/v10.5fp4_ntx64_odbc_cli.zip\/Xd.\/Xf.LPR.D1vk\/Xg.7844482\/Xi.habanero\/XY.habanero\/XZ.tXV1ZzgNXYn-0zygvQ8Qb8WK01k\/v10.5fp4_ntx64_odbc_cli.zip https:\/\/www-933.ibm.com\/support\/fixcentral\/swg\/selectFixes?parent=ibm%2FInformation%2BManagement&#038;product=ibm\/Information+Management\/IBM+Data+Server+Client+Packages&#038;release=10.5.*&#038;platform=Windows+64-bit,+x86&#038;function=fixId&#038;fixids=*odbc_cli*&#038;includeSupersedes=0 &nbsp; Uncompress the zip file to a folder, for example: F:\\work\\clidriver . In folder F:\\work\\clidriver\\bin, right click on file db2.ini -&gt; &#8220;Properties&#8221; -&gt; uncheck the &#8220;read only&#8221; attribute. update: in recent version, you need create a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[1318],"class_list":["post-496","post","type-post","status-publish","format-standard","hentry","category-tips","tag-db2"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":20,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":22558,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions\/22558"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}