Exploring the LOCAL_LISTENER parameter

This article has been moved to my new blog at edstevensdba.com.


Click here to go to the new location of this article.

40 thoughts on “Exploring the LOCAL_LISTENER parameter

  1. What if you are in a 11.2 RAC environment and you have different local listeners on different nodes. You have only one database yet it must register with host=mynode1 and host=mynode2 on the second instance?


  2. hi,

    I am training on a local server to prepare for a certification. I did the same tests with the folowing version of oracle.

    SQL> select * from v$version;
    Oracle Database 11g Enterprise Edition Release – Production
    PL/SQL Release – Production
    CORE Production
    TNS for Linux: Version – Production
    NLSRTL Version – Production

    Everything works fine except :

    Service “orcl.localdomain” has 1 instance(s).
    Instance “orcl”, status READY, has 1 handler(s) for this service…
    Service “orclXDB.localdomain” has 1 instance(s).
    Instance “orcl”, status READY, has 1 handler(s) for this service…

    It creates a orclXDB.localdomain service. how can i remove it ?
    I dont really know what i should use as my localdomain ? should I set DB_DOMAIN to a value of my /etc/host ?

    Thx for the great post. It’s really nice and clear.

    • The ‘localdomain’ in your listener registrations comes from either the SERVICE_NAMES or the DB_DOMAIN initialization parameters. Personally, I never set it and have found no particular use for it.

  3. I just read another post on your website about /etc/conf and DB_DOMAIN. I think I was mixing everything.

    As far as orclXDB is concerned. I uninstalled XDB and i did an ALTER SYSTEM SET DISPATCHERS = ”. (the orclXDB service was the only one).
    I dont really understand how the dispatchers are used yet. But i archieved my goal.

    Thx for the great site.

  4. Hi,

    The entry in my listener.ora is :

    # listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)


    (ADDRESS = (PROTOCOL = TCP)(HOST = 01hw054895)(PORT = 1521))

    While in the listener status, the o/p is:

    LSNRCTL> stat
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version – Produ
    Start Date 09-AUG-2012 19:01:42
    Uptime 0 days 0 hr. 0 min. 57 sec
    Trace Level off
    Security ON: Local OS Authentication
    Listener Parameter File D:\oracle\product\10.2.0\db_1\network\admin\listener.o
    Listener Log File D:\oracle\product\10.2.0\db_1\network\log\listener.log

    Listening Endpoints Summary…
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “TESTANIXDB” has 1 instance(s).
    Instance “testani”, status READY, has 1 handler(s) for this service…
    Service “TESTANI_XPT” has 1 instance(s).
    Instance “testani”, status READY, has 1 handler(s) for this service…
    Service “testani” has 1 instance(s).
    Instance “testani”, status READY, has 1 handler(s) for this service…
    The command completed successfully

    Plz sugegst how is my instance dynamically registered when there is no entry in listener.ora

    • “Plz sugegst how is my instance dynamically registered when there is no entry in listener.ora”

      That’s the whole point of dynamic registration. It occurs regardless of what is or is not in the SID_LIST section of your listener.ora file. To reiterate my original post:

      There are two methods by which a listener comes to know of a database instance.

      The first is static registration, which comes from the SID_LIST section of the listener.ora file. We give the listener a list of services that it can service.

      The second method is dynamic registration. In dynamic registration, the database itself contacts the listener and says, in effect “hey, I’m here, you need to service any connection requests for me as well.”

      • Hi,

        Thanks for the reply :)

        I have one query: is it that local_listener parameter is required for dynamic registration of instance for non-default values or for default values as well.
        and is it that local_listener is the only parameter which guarantees the dynamic registration of instance.

      • Actually, you had two queries, not one. ;-)

        First, you asked about LOCAL_LISTENER if using all default values. If you take another look at Fig.7 and the surrounding explanation, you will see that at that point in the demo I did NOT have a setting for LOCAL_LISTENER. In the absence of a setting, the instance will use the default settings of port 1521 to try to contact the listener. And this is the default value for the listener. So at the very minimum, you can start the listener with NO listener.ora file and will happily start and configure itself to listen on the default port of 1521. And if you start the instance with the default setting of LOCAL_LISTENER – which is no setting at all, aka NULL – it will use the default port of 1521.

        Your second question asked if there were any other parameters required to “guarantee” dynamic registration. The idea of “guranteeing” dynamic registration could be a bit broad, but LOCAL_LISTENER is the only parameter I’ve found that is directly involved in dynamic registration.

        These things are easily tested for yourself, so I would urge you to take a look at my posting on creating your own test system, at https://edstevensdba.wordpress.com/category/opinion/.

  5. Thank you for this excellent series on troubleshooting connection errors. I’ve been working with Oracle for nearly 10 years, and still learned several new things from your very clear demos. Much appreciated!

  6. Pingback: Oracle 11g Release 2: ORA-00119: invalid specification for system parameter LOCAL_LISTENER « Blog about cooking, technology and something else

  7. Hi I would to say thanks for the valuable information which you have shared with us. I have one doubt, When I try to connect the oracle db with this statement (C:\>sqlplus scott/tiger@oklacity ) in that case I am able to connect but when I do this C:\>sqlplus scott/tiger@ in this I am getting the below error. Could you please tell me why i am facing this error ? I am this error in the both cases either I try from server or from Client side. Thanks


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

    • You are trying to use the EZconnect method, which I’ve not seen a reason to spend much time poking at. But as I look up the syntax, it looks like what you are doing is correct. The fact that you get an ORA-12514 means there is a listener on port 1521 of the specified ip address, so I have to believe Oracle. What do you see when you log on to the server at and issue a ‘lsnrctl status’? Do you see a service named ‘orcl’? Not ‘ORCL’, not ‘orcl.some.domain’, just simply ‘orcl’, in lower case letters.

  8. Pingback: Non-Default Oracle Listener | Chris Gilbert

  9. I have been working on implementing a fix for Oracle Security Alert for CVE-2012-1675, the “TNS Listener Poison Attack”.

    My listener.ora has the required (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) and SECURE_REGISTER_LISTENER_PROD = (IPC).

    My listener.ora contains a SID_LIST as we manage individual instances thru Enterprise Manager.

    The server I’me testing on is a test server with four istances on it but I’m only testing with one.

    My local_listener has:

    SQL> show parameter local_listener;

    ———————————— ———– ——————————
    local_listener string (DESCRIPTION=(ADDRESS=(PROTOCO

    LSNRCTL> status
    Alias listener
    Version TNSLSNR for 64-bit Windows: Version – Production
    Start Date 15-MAY-2014 06:41:42
    Uptime 7 days 4 hr. 56 min. 30 sec
    Trace Level off
    Security ON: Local OS Authentication
    Listener Parameter File D:\oracle\product\11.2.0\db_1\network\admin\listener.ora
    Listener Log File d:\oracle\diag\tnslsnr\ngdwt2\listener\alert\log.xml
    Listening Endpoints Summary…
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “dwngdev.mydomain.com” has 1 instance(s).
    Instance “dwngdev”, status UNKNOWN, has 1 handler(s) for this service…
    Service “dwngtest.mydomain.com” has 1 instance(s).
    Instance “dwngtest”, status UNKNOWN, has 1 handler(s) for this service…
    Service “eAlpha.mydomain.com” has 2 instance(s).
    Instance “ealpha”, status UNKNOWN, has 1 handler(s) for this service…
    Instance “ealpha”, status READY, has 1 handler(s) for this service…
    Service “fisvtest.mydomain.com” has 1 instance(s).
    Instance “fisvtest”, status UNKNOWN, has 1 handler(s) for this service…
    The command completed successfully

    So as I understand it the “UNKNOWN” is because I have it defined in the SID_LIST and the “READY” is because I have the LOCAL_LISTENER parameter filled in.

    My first question is Should I remove the one from the SID_LIST? Will that still use the TCP protocol which we are trying to avoid?

    My second is I’m getting the messages indicating requests are being blocked:

    22-MAY-2014 11:46:50 * service_register_NSGR * 1194
    TNS-01194: The listener command did not arrive in a secure transport

    Do you know if there a way to find out where these requests are coming from?

    • Offhand I’m not sure. Let me review the issues on the tns poison fix.

      Ok, on second reading a few things jump out at me.
      First, you said you configured your listener with “SECURE_REGISTER_LISTENER_PROD = (IPC)”. This means you are setting the SECURE_REGISTER for a listener named LISTENER_PROD, but when you show the output of lisnrctl status, we see a listener with the default name of simply LISTENER. I have an intense dislike of trying to run multiple listeners, or even a single listener with a non-default name. I’ve never seen it fix a real problem. Doing such never accomplishes anything other than adding to the confusion.

      Maybe you need to show your entire listener.ora. As it is, all I’m seeing are snippets of it, taken out of context.

  10. Pingback: Another day another database won’t start. | Chris Grabowy's Technical Ramblings

  11. Hi ES – good post. Let’s say I have two Oracle homes ( and on the same database server (test1.x.com). I’m running two databases, ITPT ( and DXPT ( My static-service registration entries in the listener.ora file are as follows:

    (SID_DESC =
    (ORACLE_HOME = /oraclesw/11r204)

    (SID_DESC =
    (ORACLE_HOME = /oraclesw/11r203)

    The listener is running out of the 11r204 home (also location of referenced listener.ora file). If I remove the static-service DXPT entry in above listener.ora file, and add following to the 11r204 tnsnames.ora file:

    (ADDRESS = (PROTOCOL = TCP)(HOST = test1.x.com)(PORT = 1521))

    And set DXPT init parameter:

    SQL> alter system set local_listener=’LISTENER_DXPT’ scope=both;

    How does listener know that instance DXPT should be tied to the 11r203 Oracle-home binaries? Desired ORACLE_HOME used to be explicitly set in the now-deleted DXPT entry in listener.ora file. Thanks. -jk

    • John –

      That’s an interesting question I had never really thought about before.

      Looking at Oracle® Database Net Services Administrator’s Guide 11g Release 2 (11.2) E41945-02, Section 9.9.3 (http://docs.oracle.com/cd/E11882_01/network.112/e41945/listenercfg.htm#NETAG297 ), we read

      “The listener uses the dynamic service information about the database and instance before using statically configured information in the listener.ora file” (emphasis mine).

      And in Table 9-1 that follows that quote, in the description of the use of ORACLE_HOME, we read

      “On Linux and UNIX, this setting is optional.
      On Microsoft Windows, this setting is ignored. The Oracle home specified by the ORACLE_HOME parameter in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID of the Microsoft Windows registry is used”

      Of course, the entire purpose of the listener is to catch connection requests from clients, then either connect that client to a dispatcher (shared server) or spawn a dedicated server process to handle the client’s requests to the database. And so I would think that the whole question of why ORACLE_HOME would matter is one of how the listener (in a multi-home, multi-version installation) would know which version binary to load for any particular dedicated server.

      Not finding a direct answer in the docs, but I suspected that when the instance registers itself with the listener, part of what it passes is the necessary ORACLE_HOME info. To find out, I enabled tracing in the listener by adding the following line to listener.ora:


      This will trace down to the level of showing actual packets being sent and received by the listener.
      My test system is running a single version of Oracle on Oracle Linux 5.6. On that system I did the following:

      Open a putty session to work with the listener. Call it ProcL

      Open a second putty session to work with the database. Call it ProcD
      (I do this so as to be able to minimize the time between necessary commands, and thus the ‘noise’ in the trace file).

      In procL, stop the listener
      In ProcL, add the TRACE_LEVEL parameter to listener.ora
      In ProcD, connect to an idle instance.
      In ProcL, start the listener
      In ProcD, as soon as the listener is started, start the database.
      In ProcL, stop the listener.
      Examine the listener.trc file.

      Since the listener was up only long enough to allow me to force a dynamic registration, the only information in the trace that identifies my database would necessarily be those associated with the dynamic registration. So with the trace file open in notepad, I simply search for the name of my database. Sure enough, the very first occurance of the database name was in the dump of a packet being received by the listener (nsprecv: packet dump). And in that packet was information


      However, looking at the rest of the packet in context, it looks like it was simply the client process (the pmon process of the db instance) identifying itself, rather than the kind of information we think would answer your question. Even without a good understanding of the details of these deep traces it is often possible to pull out some useful information, but I’m afraid this isn’t one of them. Let’s post the question on OTN and see what kind of discussion it generates.

  12. So clear explanation, Thanks a lot. This connection method is used fraudulently. Attack is know as TNS Listener Poison Attack – CVE-2012-1675. How to prevent this attack.?

    Best regards

  13. A brilliantly clear series of posts that helped clarify a number of things for me. Thank you very much for taking the time to write it.

    I am having a problem that I don’t think is listener related but may be. Enterprise Manager Express is unreachable on my 12c install. I think this may be particular issue when ASM is used and the GI listener is used instead of the database home (just a hunch – but its fine on my non-ASM 12c installs on identical kit).

    I am struggling to find out more about how Enterprise Manager Express works with the listener and how I can investigate it further (where it’s log files are, etc).

    My question and more detail is posted here (if you were to have a free moment):

  14. After spending many hours trying to establish connection to DRCP from remote or local client using the tnsnames.ora file I finaly got it working. And then I found your posts. Thank you for the clear and transparent explanations. I wish that Oracle documentation was as clear as your posts!

  15. I have a question here

    I am trying to remove the entry listener.ora and remove the entry of local_listener from spfile.ora so that i can start my instance and then check if it’s connecting.

    But when i try to hit ‘startup’..
    it gives me error which says that it can’t open the parameter file ‘initorcl.ora’….
    But actually this file is not present itself at that location but spfileorcl.ora is present at the location.
    However if i reinsert the entry of ‘local_listener’ in spfile.ora and introduce the entry in tnsnames.ora..

    it starts the instance and listeners now knows about it without the listener.ora file…

    What is going on here?

    Note i am using the default port 1521..

    • It’s hard to say. What version and edition of Oracle? What operating system?
      I don’t understand what you mean by “remove the entry listener.ora”. Remove it from what?

      I don’t know what you mean by “hit startup”. It sounds like you are trying to start your database from some GUI front end. I don’t know what that is nor how it would actually invoke a startup and specify the parameter file. I always start my databases from a command prompt with sqlplus, so that I have full knowledge and full control over what is happening.

      How do you “reinsert the entry of ‘local_listener’ in spfile.ora “?

      By the way, I am in the progress of moving all of these demos to my new self-hosted site at edstevensdba.com. This subject has not yet been moved, but please note for future reference.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s