Re: 10g listener configuration

From: Frank van Bortel <>
Date: Thu, 17 Jan 2008 11:58:35 +0100
Message-ID: <4da0d$478f34db$524b5c40$>

Arch wrote:
> I set up systems for a classroom training environment that include
> Oracle and a database. I am trying to migrate from 9i to 10g but have
> run into a major roadblock and would appreciate some help.
> With 9i, I could edit the listener.ora and tnsnames.ora and substitute
> localhost for the actual system name. This worked perfectly and
> permitted cloning of the systems for the classroom.
> With, however that technique doesn't seem to work. Once the
> files are changed to localhost and I've restarted the listener, I
> can't get the database to register with the listener. I get "listener
> does not currently know of service requested".
> Using lsnrctl status confirms that the listener is not aware of the
> instance. There is no error in the log, other than the unknown
> service.
> Any suggestions will be appreciated.

All replies so far are way off, IMHO.
The problem you are facing is service naming; that can either be done explicitly, in listener.ora, or dynamically.

To find out, what services are supported, try lsnrctl services
Here's a sample output:

[oracle102_at_cs-frank03 ~]$ lsnrctl services LSNRCTL for Linux: Version

Copyright (c) 1991, 2006, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) The listener supports no services
The command completed successfully

As you can see - no services. As a result of that, connection efforts fail with the error you provided:

[oracle102_at_cs-frank03 ~]$ sqlplus system_at_o10gr2 SQL*Plus: Release - Production on Thu Jan 17 11:44:17 2008 Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Enter password:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

There's two things you can do about that (3, actually):

1) wait a while, until the instance has registered itself
2) force the instance to register (alter system register).
3) start the listener before opening the instance - it will try
  to register then, or opt for 1)

Anyway - as soon as the lsnrctl services command results in something like this (version snipped for brevity): Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) Services Summary...
Service "o10gr2" has 1 instance(s).
  Instance "o10gr2", status READY, has 1 handler(s) for this service...

You're OK - that is, when your tnsnames.ora is OK... Using a wrong service_name in tnsnames.ora will still generate the TNS-12514:

tnsping Arch:
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = cs-frank03)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = arch)))
OK (0 msec)

[oracle102_at_cs-frank03 ~]$ sqlplus system_at_arch SQL*Plus: Release - Production Enter password:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Which also demonstrates the limited use for tnsping...

The correct service_name would be db_name and db_domain, concatenated with a dot (db_name||'.'||db_domain).


Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up
Received on Thu Jan 17 2008 - 04:58:35 CST

Original text of this message