Configure unixODBC in Linux

By | April 7, 2017

Configuring unixODBC on Linux, can be  a general requirement for Peoplesoft or many Application to connect to Oracle database.

Check whether all required RPMs present or Not…as follows.


Result of above ccommand on Oracle Enterprise Linux is:
Now copy the unixODBC-2.2.14.tar to /u01

then extract it using tar -xvf unixODBC-2.2.14.tar which will create a folder called unixODBC-2.2.14

Now go to that folder execute the following commands in the appropriate order

Edit the following lines in /usr/local/etc/odbcinst.ini ..(The following lines will create an ODBC oracle Driver of name “Oracle_ODBC_Driver” )

Till this STEP All above things need to be done as ROOT User.
After This STEP

Edit the following lines in $HOME/.odbc.ini
TESTDSN is the name of Data Source Name,
DB,ServerName parameters are your SERVICE NAME from tnsnames.ora USER,
UserID is the username for database,
Driver name should be same as the name from previous step i.e.”Oracle_ODBC_Driver” (From /usr/local/etc/odbcinst.ini)
NOTE: For multiple connections you can create multiple DSNs in one file i.e. $HOME/.odbc.ini

Now you can use isql to test the connection

isql -v TESTDSN
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |

Leave a Reply

