[Haskell-cafe] Access to Oracle database from Haskell

Henning Thielemann lemming at henning-thielemann.de
Tue Jun 24 16:54:38 EDT 2008

On Sat, 21 Jun 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 worked best.
> ( 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.
> 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 "$@"

Thank you for the detailed hints! However, I tried a lot of this and that, 
but without a possibility to track down what went wrong, the ways to fix 
the probable problems are unbounded. Finally I get 'Driver's 
SQLAllocHandle on SQL_HANDLE_HENV failed' when I start 'isql' and that's 
where systematic error analysis stops and wild guessing starts. Since OCI 
and sqlplus work on my machine, I'll try to follow this way.

More information about the Haskell-Cafe mailing list