IT Base of Knowledge's Weblog

July 8, 2008

How to install Oracle ODBC Client for Cent OS, Fedora or other Redhat products

Filed under: Database,Oracle — itbdc @ 11:49 am

yum install unixODBC
rpm -ivh oracle-instantclient-basic-10.2.0.3-1.i386.rpm #downloaded on http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
unzip instantclient-odbc-linux32-10.2.0.3-20061115.zip #downloaded on http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
cp ./instantclient_10_2/libsqora.so.10.1 /usr/lib/oracle/10.2.0.3/client/lib/
export ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
mkdir /etc/oracle
vi /etc/oracle/tnsnames.ora

MY_SID =
 ( DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS =
  (PROTOCOL = TCP)
  (Host = 127.0.0.1)
  (Port = 1521)
  )
 )
 (CONNECT_DATA = (SID = MY_SID)
 )
)

export TNS_ADMIN=/etc/oracle

vi /etc/odbcinst.ini

[OracleODBC-10g]
Description = Oracle ODBC driver for Oracle 10g
Driver = /usr/lib/oracle/10.2.0.3/client/lib/libsqora.so.10.1
FileUsage = 1
Driver Logging = 7

vi /etc/odbc.ini

[simple]
Driver = OracleODBC-10g
DSN = OracleODBC-10g
ServerName = MY_SID
UserID = USER
Password = PASSWORD

isql -v simple

+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

4 Comments »

  1. Greate article, thanks.

    Comment by ssksorgulama — August 26, 2010 @ 2:13 pm | Reply

  2. Thanks for this acticle.
    I used it with oracle instantclient 10.2.0.3 on fedora 9.
    But with instantclient 11.2 and fedora 12 I have a error with isql :

    [01000][unixODBC][Driver Manager]Can’t open lib ‘/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1’ : file not found
    [ISQL]ERROR: Could not SQLConnect

    Comment by Yann — November 30, 2010 @ 9:59 am | Reply

  3. thanks a lot. this help me alot and save my time.

    Comment by Erwin — February 24, 2012 @ 8:43 am | Reply

  4. Thanks. This works on Ubuntu/xubuntu as well.

    Comment by cwbriscoe — December 17, 2012 @ 6:35 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.