[Haskell-cafe] Access to Oracle database from Haskell
Lanny Ripple
lanny at cisco.com
Sat Jun 21 17:06:31 EDT 2008
Lanny Ripple wrote:
> I had luck with this the other day using Database.HDBC.ODBC. For
> Ubuntu's Hardy I found that Oracle's 10.2.0.3 worked best.
> (10.2.0.4 and 11 seemed to have problems for me at least.)
>
> http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
>
> Grab the basic (not basic-lite), odbc, and sqlplus (to test) zips.
Oops. And the sdk zip.
> The odbc_update_ini.sh should be run from inside the
> instantclient_10_2 directory as root
>
> sudo /bin/sh odbc_update_ini.sh /
>
> (assuming a standard unixODBC install.) You'll also need a
> tnsnames.ora file to describe your connection(s) to the DB(s).
> You'll also need to define some environment variables to run against
> all this. I use a small script:
>
> #!/bin/sh
> oracle_home=/opt/lib/oracle/instantclient_10_2
> export TNS_ADMIN=$oracle_home
> export LD_LIBRARY_PATH=$oracle_home
> [ $# = 0 ] && exit 1
> exec "$@"
>
> Best of luck,
> -ljr
>
>
> Steve Lihn wrote:
>> You may want to check this out.
>>
>> http://www.orafaq.com/wiki/ODBC_FAQ#Where_can_one_get_ODBC_drivers_for_Oracle_and_Rdb.3F
>>
>> As Oracle is a commercial company who is not interested in open source
>> historically, it is little chance that you will get robust software
>> for free -- from someone with many years of Oracle DBA experience :-)
>>
>>
>> On 6/19/08, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>>> Is there a way of accessing a remote Oracle database by one of the common
>>> Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get
>>> unixODBC and Oracle's Instant Client running on a Linux machine, but I'm
>>> trapped in the notorious error:
>>>
>>> $ isql USER -v
>>> [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV
>>> failed
>>> [ISQL]ERROR: Could not SQLConnect
>>>
>>> This error message is discussed in various web forums, but there seems to be
>>> no systematic way to track down the problem. So I wonder whether there is
>>> another way to access the Oracle data base from Haskell.
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list