Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: tnsnames problem

Re: tnsnames problem

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Fri, 08 Oct 2004 08:51:55 -0500
Message-ID: <1097243463.FvD6+vCGqG4vzRWTsuMegg@teranews>


blx999_at_gmx.de (freak) wrote:

>Turkbear <john.g_at_dot.spamfree.com> wrote in message news:<1097156266.bXNhTrdylYoyDhEPfDsT+w_at_teranews>...
>> blx999_at_gmx.de (freak) wrote:
>>
>> >hi
>> >
>> >i know there are some tnsnames-threads already, but i could not get
>> >them to solve my problem:
>> >
>> >i have a db running on a server and try to connect to it from a remote
>> >red-hat machine with oracle client installed. when i try
>> >sqlplus USER/pw_at_xxx
>> >with xxx the name of an entry in the tnsnames.ora-file it says
>> >ORA-12154: TNS:could not resolve service name
>> >but when i try
>> >sqlplus "USER/pw_at_xxx"
>> >with xxx the whole connectionstring instead of the name of the entry
>> >in the tnsnames.ora-file it works. my conclusion is that the
>> >tnsnames.ora is not found
>> >
>> >so my question is:
>> >do i have to make the tnsnames.ora-file known somewhere ?
>> >
>> >any hint would be nice
>> >
>> >thanx in advance !
>> Oracle's tools look in one of several places expecting to find the tnsnames.ora file:
>> 1: in the same directory as the command being used ( $ORACLE_HOME\bin usually)
>> 2: In its default location : $ORACLE_HOME\network\admin
>> 3: ( and my preferred method) in a directory specified in an environment variable called TNS_ADMIN
>> set this to the directory(folder) where your tnsnames.ora is located ( I keep it in the default location for my main
>> Oracle client ( I have 3 versions installed)) so I set
>> TNS_ADMIN=c:\oracle\ora92\network \admin
>>
>> hth
>
>
>
>ok, i understand that, the real problem is that i am trying to use
>oracle from php via oci8 under apache and my suspicion is that the
>user under which the apache is running cannot find the tnsnames-file.
>are oci8 connections handled as oracle tools ?
>
>regards
>eddi

In a way yes...The user needs to have a profile that includes the environment variables needed for Oracle.. ORACLE_HOME at a minimum, the $ORACLE_HOME/bin added to PATH and TNS_ADMIN set to the correct location..( it may need LD_LIBRARY_PATH set as well, if it is not set in the global profile. Received on Fri Oct 08 2004 - 08:51:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US