5

I am trying to configure our web server (RHEL 5.4 x86) to connect to an Oracle database using unixODBC. I have installed unixODBC-2.2.11-7.1.1, which yum tells me is the latest version. I have also installed the Oracle InstantClient 11.2 and the Oracle InstantClient ODBC library.

I have symlinked the all the .so files in /usr/lib/oracle/11.2/client/lib to /usr/lib. I have set $LD_LIBRARY_PATH to /usr/lib/, $ORACLE_HOME to /usr/lib/oracle and $TNS_ADMIN to the directory containing my (valid) Tnsnames.ora file. Here are the contents of my /etc/odbcinst.ini file:

[Oracle]
Description = Oracle ODBC Connection
Driver = /usr/lib/libsqora.so.11.1
Setup =
FileUsage =

and my /etc/odbc.ini file:

[Oracle]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = //<host>:<port>/<db>
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
UserID =

(ServerName has been edited...host, port, and db are actually there, and correct)

When I run isql I get

$ isql -v Oracle
isql: symbol lookup error: /usr/lib/libsqora.so.11.1: undefined symbol: SQLGetPrivateProfileStringW

And running dltest gives me

$ dltest Oracle SQLConnect
[dltest] ERROR dlopen: Oracle: cannot open shared object file: No such file or directory

If anyone has any insights I would be grateful, I've been trying to get this to connect for about 5 hours now...

I am going home for the night, but will gladly provide more details, if necessary, tomorrow morning, to anyone willing to help...

2 Answers2

2

You might want to check this discussion in the OTN forums. The relevant discussion occurs about 75% of the way into the thread, second post by user ardesai.

DCookie
  • 2,098
  • 17
  • 18
  • 2
    yea, definitely ran across that post during my struggle. I eventually got it working, only to discover that php's odbc driver had a bug when used with an oracle odbc connection. so in the end i gave up, installed php-oci, and called it a day... –  Apr 11 '10 at 18:14
  • hmm, I encountered exactly the same problem. I can run `sqlplus` with no problem, but `isql` just failed as W_P post. I *guess* unixODBC 2.2.11 is too old to Oracle InstantClient 11.2 – LiuYan 刘研 Nov 02 '11 at 04:16
  • I downloaded the 2.2.14 binary file from http://sourceforge.net/projects/unixodbc/files/unixODBC/2.2.14/, then `tar xf unixODBC-2.2.14-linux-x86-64.tar.gz -C /` to overwrite the orginal unixODBC-2.2.11 files, now it working! – LiuYan 刘研 Nov 02 '11 at 08:58
1

New and Oracle client compatible unixODBC64 packages have just been released in RHEL5.8.

Bonjan
  • 11
  • 1