Help with ORACLE env var definition and WWW

From: Patricia Rodriguez-Tome <tome_at_EMBL-EBI.ac.uk>
Date: 1995/10/09
Message-ID: <DG6z2G.9A5_at_ebi.ac.uk>#1/1


Hello everybody,

Thanks to those who answered my previous posts, it helped me point to where is my problem.

I am trying to run a small oraperl query using the web. My script run perfectly when I ran it from the shell but not from the web browser. I am sure the error is that I (very) badly define the env variables in the script, but I can't find the solution.

Oh and I am using SQL*net 2.0 to access the database.

here are my env files :

sqlnet.ora : DB1 T:hostname:DB1

tnsname.ora :
DB1=(description=(address=

(protocol=TCP)
(port=8888)
(host=hostname)

                    )
            (connect_data=(sid=SID1))
       )

$TWO_TASK=T:DB1 in my env

now in my script I define the environment variables : ORACLE_HOME, TNS_ADMIN to the correct directories, TWO_TASK to the value I get by echo $TWO_TASK but I don't know what value to give to ORACLE_SID. In fact if I leave it empty, or give : SID1, or T:SID1, or T:hostname/port:SID1 I always get this error message ORA-12154: TNS:could not resolve database name and the explanation for this error is that the database name in tnsnames.ora is wrong. Ok, but where should I put that file? I copied (from my home dir) it in the cgi-bin dir without success.

and my login command is (this is oraperl, $dbase=DB1): $lda = &ora_login("$server", "$user_at_$dbase", "$password");

This seems so trivial that I feel ashame not being able to find the solution ;-)

Thanks for any help,
Pat RT

-- 
=======================================================================
Dr. Patricia Rodriguez-Tome		| URL:  http://www.ebi.ac.uk
The EMBL Outstation, Hinxton - The European Bioinformatics Institute
Hinxton Hall, Hinxton			| Tel:	+44 (0)1223 494 409
Cambridge CB10 1RQ, UK			| Fax:	+44 (0)1223 494 468
========================================================================
Received on Mon Oct 09 1995 - 00:00:00 CET

Original text of this message