[unixODBC-support] how to connect to oracle xe?
GianLuca Sarto
glsarto at tiscali.it
Sun Jan 3 21:08:42 GMT 2010
GianLuca Sarto wrote:
> Ken Resander wrote:
>> 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:
>>
>> /etc/odbcinst.ini
>> [OracleExpressdrv]
>> Driver =
>> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libsqora.so.10.1
>> Description = Oracle 10g express driver
>>
>> /etc/odbc.ini
>> [TestDBDSN]
>> Application Attributes = T
>> Attributes = W
>> BatchAutocommitMode = IfAllSuccessful
>> CloseCursor = F
>> DisableDPM = F
>> DisableMTS = T
>> Driver = OracleExpressdrv
>> DSN = TestDBDSN
>> 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
>>
>> not
>>
>> 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.
>>
>> Ken
>>
>> 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:
>>> GianLuca Sarto wrote:
>>>> Nick Gorham wrote:
>>>>> GianLuca Sarto wrote:
>>>>>> Nick Gorham wrote:
>>>>>>> GianLuca Sarto wrote:
>>>>>>>> Nick,
>>>>>>>>
>>>>>>>> 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.
>>>>>>>> Aborted
>>>>>>>>
>>>>>>> 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 add?
>>>>> 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 found:
>> *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
>> <http://www.unixodbc.org/utilities.html> share library. Do not
>> access these INI files directly!
>>
>> *That's why I tried ODBCConfig.
>>
>> I 'll go on googling...
>>
>> thanks for your help,
>> -Gian
>>
>>
>>
>> -----Inline Attachment Follows-----
>>
>> _______________________________________________
>> unixODBC-support mailing list
>> unixODBC-support at mailman.unixodbc.org
>> </mc/compose?to=unixODBC-support at mailman.unixodbc.org>
>> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>>
>>
>> ------------------------------------------------------------------------
>> New Email addresses available on Yahoo!
>> <http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/>
>>
>> Get the Email name you've always wanted on the new @ymail and
>> @rocketmail.
>> Hurry before someone else does!
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> unixODBC-support mailing list
>> unixODBC-support at mailman.unixodbc.org
>> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>>
> Ken,
>
> thanks for your message.
>
> I do not have the /server subfolder, did you install the XE client, or
> the instant one?
>
> I'm totally confused!
>
> -Gian
> ------------------------------------------------------------------------
>
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>
Let's get back to square one.
Because this works:
gian at hp-gls:~$ ./sqlplus user/pwd@//192.168.1.126:1521/XE
So, where do I put the server address, 192.168.1.126:1521/XE into the
odbc.ini or odbcinst.ini?
I guess that missing this info , I never be able to connect...
-G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20100103/70a4cc4c/attachment-0001.html>
More information about the unixODBC-support
mailing list