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: This should be an easy "TSN: could not resolve service name" problem:

Re: This should be an easy "TSN: could not resolve service name" problem:

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 19 Jan 2003 23:48:15 -0800
Message-ID: <92eeeff0.0301192348.f872af@posting.google.com>


"jennifer muise" <jen.muise_at_videotron.ca> wrote in message news:<nvKW9.24934$Ye4.161232_at_wagner.videotron.net>...
> Hi,
>
> I have Oracle9iEMS and Orace9iDS installed on my windows XP machine.
>
> If I run sqlplus from \oracle\ora92\bin, I connect with no problems:
>
> C:\oracle\ora92\bin>sqlplus ****************************
>
> SQL*Plus: Release 9.2.0.1.0 - Production on Sun Jan 19 22:48:48 2003
>
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
>
> Connected to:
> Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.1.0 - Production
>
> SQL>
>
> However, if I connect using the same string in the developer directory,
> the local sqlplus does not connect (nor do any of the other
> applications).
>
>
> C:\oracle\developer\bin>sqlplus
> *******************************************
>
> SQL*Plus: Release 9.0.1.3.0 - Production on Sun Jan 19 22:52:52 2003
>
> (c) Copyright 2001 Oracle Corporation. All rights reserved.
>
> ERROR:
> ORA-12154: TNS:could not resolve service name
>
> I have tried monkeying with OracleHome selector, but this had lead
> nowhere yet.
>
> Thanks for any advise!
> T.
> --

When you launch sqlplus from C:\oracle\developer\bin, it tries to read configuration files (tnsnames.ora etc) from C:\oracle\developer\network\admin directory instead of \oracle\ora92\network\admin directory thus resulting in unresolved service name.

Set a TNS_ADMIN system variable whose value points to \oracle\ora92\network\admin directory. This way no matter where you launch sqlplus from, it will always read configuration files from TNS_ADMIN directory.

This variable is usefull if you have more then one oracle homes on the same machine, as in your case, or in a multi user environment and only one copy of configuration files is desired.

Regards
/Rauf Sarwar Received on Mon Jan 20 2003 - 01:48:15 CST

Original text of this message

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