<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS Viya 3.5 ODBC DB2 connect Tutorial in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626745#M18270</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312215"&gt;@N224&lt;/a&gt;&amp;nbsp; - Thank you for taking the time write this. It's great when Community users document complicated configuration processes!&lt;/P&gt;</description>
    <pubDate>Sun, 23 Feb 2020 19:10:18 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-02-23T19:10:18Z</dc:date>
    <item>
      <title>SAS Viya 3.5 ODBC DB2 connect Tutorial</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626709#M18268</link>
      <description>&lt;P&gt;Hi, after so much pain connecting SAS Viya 3.5 to ODBC i wrote a small article how to get it to work.&lt;/P&gt;&lt;P&gt;I strongly recommend using direcotories like :&lt;/P&gt;&lt;PRE&gt;/sas
/sas/install
/sas/install/clidriver&lt;/PRE&gt;&lt;P&gt;I’m going to use some variables that you have change for yours like :&lt;/P&gt;&lt;PRE&gt;DATABASE_NAME – name of your database you want to connect to
DATABASE_LOGIN – name of account used to connect to DB
DATABASE_PASSWORD – password
DATABASE_IP – IP address of server providing db2 database.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Download and unpack db2cli driver for odbc to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/sas/install/clidriver&lt;/PRE&gt;&lt;P&gt;RHEL comes with unixODBC driver 2.3.1, and even if you want install newer one, yum still containst 2.3.1.&lt;/P&gt;&lt;P&gt;Check this out using command :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;odbcinst –version&lt;/PRE&gt;&lt;P&gt;Check currently used files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;odbcinst -j&lt;/PRE&gt;&lt;P&gt;We have to download newest available version (for today its 2.3.7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;cd /sas/install
wget -c http://www.unixodbc.org/unixODBC-2.3.7.tar.gz
tar xvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure
make
make install
odbcinst --version
odbc_config –prefix&lt;/PRE&gt;&lt;P&gt;Now we have to prepare some files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;/usr/local/etc/odbcinst.ini&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[DB2]
Description = DB2 Driver
Driver = /sas/install/clidriver/lib/libdb2o.so
FileUsage = 1
dontdlclose = 1&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;/usr/local/etc/odbc.ini&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[DB2ODBC]
Driver=DB2
Database=DATABASE_NAME
Protocol=TCPIP
Port=50000
Hostname=DATABASE_IP
UID=DATABASE_LOGIN
PWD=DATABASE_PASSWORD
option=3
charset=UTF8&lt;/PRE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;NO MATTER WHAT CHARSET DOES DB USE, JUST TYPE "CHARSET=UTF8", don't know why - it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now prepare db2 driver&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;cp /sas/install/clidriver/cfg/db2cli.ini.sample /sas/install/clidriver/cfg/db2cli.ini
cp /sas/install/clidriver/cfg/db2dsdriver.cfg.sample /sas/install/clidriver/cfg/db2dsdriver.cfg&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit &lt;STRONG&gt;/sas/install/clidriver/cfg/db2cli.ini.sample /sas/install/clidriver/cfg/db2cli.ini&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[DB2ODBC]
Driver=DB2
Database=DATABASE_NAME
Protocol=TCPIP
Port=50000
Hostname=DATABASE_IP
UID=DATABASE_LOGIN
PWD=DATABASE_PASSWORD&lt;/PRE&gt;&lt;P&gt;Edit &lt;STRONG&gt;/sas/install/clidriver/cfg/ db2dsdriver.cfg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add a new xml to dsncollection&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsn alias="DB2ODBC" name=" DB2ODBC " host="DATABASE_IP" port="50000"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;parameter name="UserID" value="DATABASE_LOGIN "/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;parameter name="Password" value="DATABASE_PASSWORD "/&amp;gt;
    &amp;lt;/dsn&amp;gt;&lt;/PRE&gt;&lt;P&gt;And finally add to files :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/opt/sas/spre/home/SASFoundation/bin/sasenv_local&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/opt/sas/viya/config/etc/cas/default/cas_usermods.settings&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/opt/sas/viya/config/etc/sysconfig/compsrv/default/sas-compsrv&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;export ODBCSYSINI=/usr/local/etc
export ODBCINI=odbc.ini
export ODBCINSTINI=odbcinst.ini
export LD_LIBRARY_PATH=/usr/local/lib:/sas/install/clidriver/lib/:$LD_LIBRARY_PATH
export PATH=/usr/local/lib:$PATH
export DB2_CLI_DRIVER_INSTALL_PATH=/sas/install/clidriver
export LIBPATH=/sas/install/clidriver/lib
export PATH=/usr/local/sbin:$PATH
export PATH=/usr/local/bin:$PATH
export PATH=/sas/install/clidriver/bin:$PATH
export PATH=/sas/install/clidriver/adm:$PATH&lt;/PRE&gt;&lt;P&gt;Exporting so many envs is quite an overdo but.. it works &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy having successful connection to db2&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 11:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626709#M18268</guid>
      <dc:creator>N224</dc:creator>
      <dc:date>2020-02-23T11:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya 3.5 ODBC DB2 connect Tutorial</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626745#M18270</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312215"&gt;@N224&lt;/a&gt;&amp;nbsp; - Thank you for taking the time write this. It's great when Community users document complicated configuration processes!&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 19:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626745#M18270</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-02-23T19:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya 3.5 ODBC DB2 connect Tutorial</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626767#M18271</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312215"&gt;@N224&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I second&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;'s comment. This is great info on a non-trivial topic. I think many users will benefit from this. I'd like to inquire if you'd be willing to formalize this post into a Communities Library article? I'd be happy to help you publish it (you've done most of the work already). I would be sure to pass your steps onto a SAS SME, for any additional input (if any). Please let me know if you're interested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joe&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 01:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Viya-3-5-ODBC-DB2-connect-Tutorial/m-p/626767#M18271</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2020-02-24T01:17:06Z</dc:date>
    </item>
  </channel>
</rss>

