| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12560 on NT
On Tue, 11 Mar 2003 15:38:50 +0200, Leutwein wrote:
> Hi Howard.
> Thanks for the detailed reply.
> In step 1 you mentioned I must reconfigure the NET8.
> When I want to reconfigure the service name I get the following error :
>
>
> Connecting...ORA-12514: TNS:listener could not resolve SERVICE_NAME given in
> connect descriptor
> The test did not succeed.
I've replied regarding your question about removing services a little later on in the thread.
All I can say about this particular error is that it is caused when the database registers itself with the listener under one name (dynamic instance registration) and your tnsnames is requesting a "SERVICE_NAME" connection that's different.
It's a long story, but it starts when you first create a database. If you are using the Database Creation Assistant to do it, one of the first screens you get demands to know a Global Database Name, and a SID. A common mistake is to type, for example, "DB8" in both. That will cause problems later, because then the database registers itself using the default '.world" domain extension.
So always specify a fully-qualified global database name. If you are on a standalone PC, for example, called Fred, such that the concept of a domain means nothing to you, I would create the database with a global name of DB8.Fred.Local. At home, I have a peer-to-peer network, not a proper domain, so all my databases are things like mozart.aldeburgh.local. The SID then goes in just as DB8, or MOZART.
When you then use the Net Configuration Assistant to create a tnsnames.ora, you are first asked for the service name -this is the fully-qualified name, such as mozart.aldeburgh.local. At the end of the Wizard it asks what you want to refer to the service as, and you can pretty much type anything that makes sense to you there. I always go for th short-form name, such as DB8, or MOZART. It's this short-form name which you then supply as part of your connection string: connect scott/tiger_at_mozart.
Warning: at this point, beware the sqlnet.ora, because it has an entry called (from the top of my head) SQLNET.DEFAULT_DOMAIN, and if that is set to something, say BLAH, then the word 'BLAH' is silently appended to any unqualified connection requests. connect scott/tiger_at_mozart would actually be converted into conect scott/tiger_at_mozart.blah for example.
If you've only got an entry for MOZART=etc etc etc in your tnsnames, then there won't be a match between the mozart.blah you've supplied (unbeknownst to you) and the 'mozart=' you've got in the tnsnames.ora. The solution is either to get rid of the DEFAULT_DOMAIN in sqlnet.ora, or to edit your tnsnames and append the default domain to your aliases. One way or another, what you supply as an alias at connect time needs to match up with what your tnsnames can resolve.
And (the particular problem you have right now) the whole lot needs to match up with what the Listener is aware of the instance as having registered itself with -which setting a proper global database name should sort out for you (although there are a couple of init.ora parameters that can change the default registration behaviour... I'll save those for another day, if that's OK!!).
Best of luck
Regards
HJR
Received on Tue Mar 11 2003 - 13:31:58 CST
![]() |
![]() |