nguye103 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
While trying to install DBD-oracle on my linux, I found these instructions in the readme file:

I simply installed SQL*Net ($ORACLE_HOME/network/admin/*) and the OCI libraries which are in $ORACLE_HOME/lib. You'll also need the header files from $ORACLE_HOME/sqllib/public/*.h and $ORACLE_HOME/rdbms/demo/*.h (you won't need them all, but you can get rid of them after DBD::Oracle compiles).

[You'll probably need at least ocommon in addition to network. But if you use the Oracle installer (as you always should) it'll probably install ocommon for you.]

So just put that stuff on your client box and install DBI and DBD::Oracle there. Once DBD::Oracle is installed you can remove the OCI libraries and headers (make sure to keep SQL*Net!) The main thing is to have a good tnsnames.ora file in $ORACLE_HOME/network/admin

I don't understand all the things that contain "$ORACLE_HOME" Is this some sort of file or directory that is already currently on the computer or is it some type of command. I don't have ORACLE on Linux, but I need to access an Oracle database. Any help would be appreciated. Thank you

20040930 Janitored by Corion - Added formatting

Replies are listed 'Best First'.
Re: ORACLE HOME ENVIRONMENT
by exussum0 (Vicar) on Sep 30, 2004 at 14:01 UTC
    One of the prereq's for accessing an oracle server is an oracle client. DBI depends on a DBD to access any database. The DBD can use native code to access the database. In oracle's case, the oracle client is needed. It is almost never the case that a DBD will have the client implemented within it, in perl. Minimally, you need the oracle client for linux. To compile, I'm quite sure you need the development kit for oracle installed as well. They don't take up herendous amounts of space.

    Update: Forgot to mention, ORACLE_HOME is the dir where you installed the oracle client... so it can find the drivers and the various ora config files, should they be needed.

    ----
    Then B.I. said, "Hov' remind yourself nobody built like you, you designed yourself"

Re: ORACLE HOME ENVIRONMENT
by aquarium (Curate) on Sep 30, 2004 at 13:58 UTC
    you need to install oracle client on your box, the same version (8 or 9 or 10) as on the server having the oracle server software. oracle is freely downloadable from www.oracle.com when you install the client, one of the pre-installation steps is to choose a directory for the install which becomes (and you must set this environment variable in your login script) $ORACLE_HOME. Oracle software (when installed) refers to this environment variable when finding it's own binaries etc.
      Not entirely true on the version thing. 8 client works with 9 server. Don't ask me why :) Though it's silly not to keep the client versiosn in sync.

      Update: clarified what works with what from my experience.

      ----
      Then B.I. said, "Hov' remind yourself nobody built like you, you designed yourself"