[unixODBC-support] why does it not connect to Oracle Express?
kresander at yahoo.com
Wed May 13 19:04:12 BST 2009
I have DB2, MySQL, Mimer SQL and SQL Anywhere connect successfully via unixODBC on Ubuntu 8.10, but Oracle Express 10g is giving me a hard time.
I am getting this error on SQLConnect when trying to connect to Oracle's HR sample database on my local PC:
Usage error: SQLConnect: dsn=TestDBDSN, user=hr, password=hr <<-- by my code
1: st=IM004, nerr=0, msg=
[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
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
DSN = TestDBDSN
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
I have posted about this in Oracle Linux forum, Oracle Express forum and on DBforums forum, but no one seems to know.
I have googled for days on 'IM004' and 'SQLAllocHandle on SQL_HANDLE_HENV failed' etc and received matches, but most of them old, for Windows or other db products. Some posts have suggested 'set environment variable so-and-so', which have done by adding to the bash login script. These
# Added by ken for oracle
but still no luck.
10g Release 2 (10.2) for UNIX-Based Operating Systems
contains information about ODBC using unixODBC in appendix G, but none of it helped. I have not found any other Oracle documentation about ODBC for Linux. The Oracle Admin Reference says that error messages formatted [unixODBC][Driver Manager]message-text are output by the unixODBC driver manager, so I checked and found that the message text 'Driver's SQLAllocHandle on SQL_HANDLE_HENV failed' is set in _info.c, post_internal_error for case ERROR_IM004.
It is hard for me to understand the unixodbc driver code. Is there any error information coming from the Oracle driver that may hint at a solution? Do you know if anyone has managed to connect to Oracle Express on Linux?
I really don't want to give up on this, but...
P.S. when googling I found some posts containing unixODBC tracing code.
How do I turn tracing ON?
Get your new Email address!
Grab the Email name you've always wanted before someone else does!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the unixODBC-support