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: TNS-12541 TNS:no listener

Re: TNS-12541 TNS:no listener

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Fri, 22 Mar 2002 22:48:54 +1100
Message-ID: <a7f5ot$6ac$1@lust.ihug.co.nz>


It's a convoluted story (and there are some papers on the Tips/Networking link at my site that may help you sort it out).

Your TNSNAMES says this:
JKBDATA = (DESCRIPTION = etc etc etc... (SERVICE_NAME = jkbdata)

Your LISTENER says this: SID_LIST_LISTENER =(SID_DESC = (GLOBAL_DBNAME = jkbdata)(SID_NAME = jkbdata) etc etc etc...

And your SQLNET doesn't have an entry for NAMES.DEFAULT_DOMAIN.

Suppose you do a connect system/manager_at_jkbdata. If there *had* been an entry in SQLNET (say, of "world", then whatever was declared to be the default domain there would be silently appended to your "@jkbdata", so that -in effect- you'd be typing 'connect system/manager_at_jkbdata.world. Since your tnsnames only has an entry for 'jkbdata', and NOT
'jkbdata.world', no match would have been found and you'd have received an
'ORA-12154 unable to resolve service name' error. Presumably that's not
what is happening to you (though the exact errors would have been nice), because your SQLNET isn't doing the silent append, and hence your connect alias *does* match your tnsnames.

So the Domain name being mentioned is not your NT domain (though it can be, if you configure things that way). It's whatever was appended after the db_name when the database was first created, and whatever is set as the db_domain init.ora parameter. And (just to keep you confused) whatever appears after the database name when you do a select * from global_name. All three sources should agree, of course. And there's no harm in not having a domain name if you don't want one (though I use "aldeburgh.local" to signify that I don't have a proper domain name (my internal NT domain is called 'aldeburgh').

However, that's not the end of the story, as we shall see (hold breath now).

In 8i, they introduced the ability for PMON to regularly contact the Listener and tell it of the Instance's existence. That's to support load balancing and failover -if the Listener is aware that the Instance exists, it can realise when it ceases to exist, and stop sending connections there.

But if the Instance is registering itself with the Listener, it's pretty crucial to know under what name it's registering. (And here's where you can start breathing again). Go to a command prompt, type lsnrctl services, and see what name(s) appears there. You want to see something like "jkbdata has 1 handler". If you see "jkbdata.world" (or some other domain name appended to your database name), you'll either want to change the way its registering,or adjust your tnsnames accordingly. For starters, and just to get things working quickly, adjusting the tnsnames is easiest.

You'd then also need to adjust the "global_dbname" bit of the Listener.ora, so that it agrees. However, since Instances register themselves these days, you don't need a SID_LIST_LISTENER part of the listener.ora at all. For example, this works for me:

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mozart)(PORT = 1521))   )

...not a SID_LIST in sight, and yet it all works fine.

Doing things that way will mean that there's no possibility of confusing things by typing in as part of the SID_LIST_LISTENER anything that contradicts what the Instance would want to tell the Listener directly.

To diagnose the problem properly, though, we need the exact error message, and it's ORA number. ORA-12514 or ORA-12154. Or something else.

Regards
HJR

--
----------------------------------------------
Resources for Oracle: http://www.hjrdba.com
===============================


"Julian K. Black" <julianb_at_bellsouth.net> wrote in message
news:4nnm8.136137$Yd.6715455_at_e3500-atl1.usenetserver.com...
> It is oralce 8i .  When you say domain if you are referring to my NT
domain
> is it needed since it resides on the same computer?   If so can you make
the
> necessary modification and post it for me(just use mydomainname ).
thanks.
> Here is a copy of my sqlnet.ora file:
>
> # SQLNET.ORA Network Configuration File:
> C:\Oracle\Ora81\network\admin\sqlnet.ora
> # Generated by Oracle configuration tools.
>
> SQLNET.AUTHENTICATION_SERVICES= (NTS)
>
> NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
>
>
> "Hans de Ruiter" <hans.ruiter-de_at_siemens.nl> wrote in message
> news:a7cq3i$2n5_at_thor.siemens.nl...
> > Julian;
> >
> > Use Net 8 assistant to test/configure your connection. (assuming 8i) Be
> sure
> > to check your names.default_domain inside your sqlnet.ora. You didn't
use
> > any domain name in your listener.ora and tnsnames.ora. (global_dbname
and
> > service_name)
> >
> > Hans
> >
> > "Julian K. Black" <julianb_at_bellsouth.net> wrote in message
> > news:Kjlm8.140622$Nn6.6908516_at_e3500-atl2.usenetserver.com...
> > > Hello gang
> > >
> > > I am having a problem connecting to my oracle server thru clients
> > software.
> > > I am running the client and the server off the same machine. The OS is
> > > windows 2000 server
> > >
> > > My listener is up and running but I cannot seem to connect to my
oracle
> > > server.
> > ><snip>
> >
> >
>
>
>
Received on Fri Mar 22 2002 - 05:48:54 CST

Original text of this message

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