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

From: Sam Sanjabi <sampaio_at_kozmail.com>
Date: 17 Sep 2001 06:07:17 -0700
Message-ID: <bda6b456.0109170507.2e10d2ff_at_posting.google.com>


"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:<tq52ptadnm2fd8_at_news.demon.nl>...
> "Sam Sanjabi" <sampaio_at_kozmail.com> wrote in message
> news:bda6b456.0109141414.24376d7d_at_posting.google.com...
> > Hi All:
> >
> > I'm trying to use DBA Studio on win2k to access a remote Oracle8i
> > database. The problem is I get an "ORA-12154: TNS: Could not resolve
> > service name" error when I try to connect from the client machine.
> >
> > I can access the DB with SQLPLUS from the server machine, but not from
> > the client machine (I get the same error). I can connect to the
> > database host, I've tried to create a Net Service name through the
> > Net8 configuration assistant, as well as through DBA studio itself.
> >
> > The current facts are:
> > + The listener is running on the right port
> > + The relevant entry in the listener.ora file on the server is:
> >
> > SID_LIST_LISTENER =
> > (SID_LIST =
> > (SID_DESC =
> > (GLOBAL_DBNAME = QLABDEV.ZKS.NET)
> > (ORACLE_HOME = /export/home/oracle/OraHome)
> > (SID_NAME = QLABDEV)
> > )
> > )
> >
> > + The relevant entry in the tsnnames.ora file on the client is:
> >
> > QLABDEV.EIGHTBALLS.QAEPD.ZKS.NET =
> > (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS =
> > (PROTOCOL = TCP)
> > (HOST = eightballs.qaepd.zks.net)
> > (PORT = 1521)
> > )
> > )
> > (CONNECT_DATA = (SID = QLABDEV)(SERVER = DEDICATED))
> > )
> >
> > As you can see, the SID's match, and I can connect to the host
> > just fine
> >
> > Does this have some thing to do with oracle name server configuration?
> > If so, could someone tell me what to do about it? Can anyone help?
> >
> > I appreciate any advice,
> > Sam.
>
> Your tnsnames.ora is incorrect, which is exactly what the error message
> indicates.
> Please remove 'eightballs.qaepd' from the service name definition, so make
> it identical to global_dbname in listener.ora.
>
> Hth,
>
> Sybrand Bakker, Senior Oracle DBA

Thank you very much for the help. As I understood it the QLABDEV.EIGHTBALLS.QAEPD.ZKS.NET is only the symbolic "Net Service" name used by the client. However, I did try what you suggested and changed the tnsnames.ora entry to:

            QLABDEV.ZKS.NET =
              (DESCRIPTION =
                (ADDRESS_LIST =
                  (ADDRESS =
                    (PROTOCOL = TCP)
                    (HOST = eightballs.qaepd.zks.net)
                    (PORT = 1521)
                  )
                )
                (CONNECT_DATA = (SID = QLABDEV)(SERVER = DEDICATED))
              )

The problem, however, still persists. I figured that what I have misconfigured would be something in the 'SID' field on the client, or the 'SID_NAMES' field on the server.

Sam. Received on Mon Sep 17 2001 - 15:07:17 CEST

Original text of this message