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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12154: TNS:could not resolve service name

Re: ORA-12154: TNS:could not resolve service name

From: Dirk Kiehne <dirk_at_liberate.com>
Date: Sat, 21 Jul 2001 21:30:58 GMT
Message-ID: <3B4620BA.F6DF0B5D@liberate.com>

Also besides the tnsnames.ora ($ORACLE_HOME/network/admin), in the same directory is a file sqlnet.ora. After much experimentation I've found that the parameter:

        NAMES.DEFAULT_DOMAIN =
is very important as to what the entries need to be in tnsnames.ora.

Essentially if NAMES etc is set in sqlnet.ora you will need to append each instance in tnsnames.ora with that domain in order for sqlnet to find it. You can type it in on the command line without the domain but the tnsnames.ora must include the domain.

Alternatively you can comment out NAMES etc in sqlnet.ora and just put the instances without the domain in tnsnames.ora.

-Dirk

TurkBear wrote:
>
> Oracle will ONLY use tnsnames.ora ( or a name server if you have one configured) to locate a database instance, so that is
> where you need to work..
>
> Edit it in vi ( GUI is not a help)
> Also be sure to define an environment variable called TNS_ADMIN which points to your $ORACLE_HOME/Network/admin
> location...
> ( Yo do have Oracle_home defined I presume)
>
> The TWO_TASK will save you from having to specify the instance, but it will not locate it..
> With Two_task defined as , for instance, mydb, then you can connect to mydb with:
> sqlplus username/password
>
> Without Two_task set, you would need:
> sqlplus username/password_at_mydb
>
> In either case, you tnsnames.ora must have an entry called mydb...
>
> "Rob Lyle" <rob_at_consus.co.uk> wrote:
>
> >Hello people,
> >
> >I'm being dumb I'm sure, as I've checked everything I know I should check
> >(obviously not).
> >
> >Could someone tell me where to look to stop Oracle croaking with this?
> >
> >Setup: Linux 8.1.6 client connecting to Solaris (SPARC) 8.1.7 server.
> >
> >I've checked DNS forward/reverse resolution on both server and client,
> >checked tnsnames.ora (the Oracle GUI puts some garbage in their if you use
> >that to define the connection). I've defined TWO_TASK also with the global
> >database name.
> >
> >Cheers,
> >
> >--Rob.
> >
> >
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Received on Sat Jul 21 2001 - 16:30:58 CDT

Original text of this message

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