in reply to Connecting to a remote Oracle database from CGI scripts

This is all great advice. To clarify, I don't want to have to install anything beyond the tnsnames.ora file on the web server. I want this to be enough to get me to the server that holds the database. So if possible, anything regarding ORACLE_HOME is kind of out of the question. I've found, thanks to your suggestions, that if i specify the host in my connection call that I am able to connect. But my tnsnames.ora file actually specifies the host, so I shouldn't have to also specify it in my script.
  • Comment on Re: Connecting to a remote Oracle database from CGI scripts

Replies are listed 'Best First'.
Re: Re: Connecting to a remote Oracle database from CGI scripts
by rdfield (Priest) on Jan 15, 2002 at 15:25 UTC
    I know this is an old post, but I think that it requires another response (for the archives). To connect to a remote Oracle database you must install the Oracle Client Software. It's pretty easy, just pop in the CD and follow the prompts. The installer will only copy and configure the minimum amount of software required. There are plenty of resources out on the net WRT to installing Oracle on Linux if that's what you require (try "oracle-on-linux" on groups.yahoo.com for a start). Next, install the latest versions of DBI & DBD::Oracle. You'll have to set up a couple of env vars before running the tests but they will work 100% if you set ORACLE_HOME to the appropriate directory on the client and ORACLE_SID to the appropriate entry in tnsnames.ora (and set the username/password if the DBD::Oracle tests complain). If you're using Apache, always install Apache::DBI otherwise your webserver will spend all day connecting & disconnecting from Oracle and doing hardly any "real" work.

    rdfield