[unixODBC-support] how to connect to oracle xe?

Ken Resander kresander at yahoo.com
Sat Jan 2 12:43:40 GMT 2010

Hi GianLuca,

I managed to get Oracle XE working with unixODBC about 8 months ago. It was not easy. The Oracle driver documentation is very poor and incomplete.
A few days ago I posted on this mailing giving all information that helped me get Oracle XE up and working. Before continuing your Google search try the ini files below, if you have not already done so:    

Driver = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libsqora.so.10.1
Description = Oracle 10g express driver

Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = OracleExpressdrv
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
# ServerName is TNS_alias_from_tnsnames.ora
ServerName = XE
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
UserID = hr

You may also need to put this or parts of this in your startup file:

ODBCINI=/etc/odbc.ini;export ODBCINI
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0;export ORACLE_HOME
TNS_ADMIN=$ORACLE_HOME/server/network/admin;export TNS_ADMIN
LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib;export LD_LIBRARY_PATH

The main problem that stopped me connecting was that Oracle had changed the install directory structure (undocumented?). I discovered by trial and error that ORACLE_HOME has to be:

ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server


ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0

which is shown in dozens of pages on the Internet going back many years.

Hope this works for you.


P.S. I stopped using the GUI tools a long time ago. It is a lot easier just to type in the ini sections as text files. Don't remember which one(s), but some GUI tool(s) are buggy and cannot generate complete and correct text files.


--- On Sat, 2/1/10, GianLuca Sarto <glsarto at tiscali.it> wrote:

From: GianLuca Sarto <glsarto at tiscali.it>
Subject: Re: [unixODBC-support] how to connect to oracle xe?
To: "Support for the unixODBC project" <unixodbc-support at mailman.unixodbc.org>
Date: Saturday, 2 January, 2010, 6:35 PM

Nick Gorham wrote:
Sarto wrote:

  Nick Gorham wrote:

    GianLuca Sarto wrote:

      Nick Gorham wrote:

        GianLuca Sarto wrote:



thanks for your kind reply.


I am not sure I fully understood the Oracle ReadME, but I managed to
install the driver.


Well, almost...


ODBCConfig crashes when I try to configure the driver:

gian at hp-gls:/usr/lib/oracle/instantclient_10_2$ sudo ODBCConfig

ODBCConfig: libltdl/ltdl.c:1178: try_dlopen: Assertion `filename
&& *filename' failed.



I would avoid ODBCConfig and just edit the ini files. You haven't got a
setup lib


How should I edit my ini files? are there any required entries I should

Should be documented with the driver.


it should, but it is not.


I'm asking what are the UnixOdbc requirements in the ini files.


If I'm OT or on the wrong list please forgive me.

It fine asking, I just don't know the full answer :-)


All unixODBC needs is a [DSN] section in the odbc.ini file that
contains a


Driver = NameofDriver


That refers to a [NameofDriver] section on odbcinst.ini that contains a


Driver = /path/to/the/driver/libdriver.so


All the other entries are up to the driver. Thats why it needs info
from the driver. I would expect there wil be a sample ini setup
somewhere in the docs, it would be a mistake assuming that everyone can
use (or wants to use) the GUI tools.


it's fine for me to use the command line, but reading unixODBC docs I

NOTE: odbc.ini and odbcinst.ini are
considered to be ODBC System Information. All access (read or write) to
this System Information should occur via the Driver Manager or the ODBCINST
share library. Do not access these INI files directly!

That's why I tried ODBCConfig.

I 'll go on googling...

thanks for your help,



-----Inline Attachment Follows-----

unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org

      Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20100102/f8437a74/attachment.html>

More information about the unixODBC-support mailing list