Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: listener.ora search order

RE: listener.ora search order

From: <>
Date: Mon, 23 Feb 2004 10:37:21 -0800
Message-ID: <>

The fact that you listener.ora resides in the same directory as %TNS_ADMIN% does
not necessarily indicate that the %TNS_ADMIN% variable is used to locate the
listener.ora file.

I just spent 10 minutes looking for some documentation of the listener search path,
couldn't find anything useful on MetaLink, Google or in the docs.

Maybe someone here has a link.


"Reardon, Bruce (CALBBAY)" <> Sent by:
 02/22/2004 02:19 PM
 Please respond to oracle-l  

        To:     <>
        Subject:        RE: listener.ora search order

The listener on Windows with 81745 will certainly read from the = tns_admin env variable location.
That is the only location we have the listener.ora file.

The listener runs as a service though.
By any chance, have you set tns_admin env variable and not rebooted the = server since?
If so, the listener (like all services) would not be picking up the new = environment variable (as per recent info provided by Jared & others). One way around this would be to add a tns_admin string variable to the = relevant homes of your registry's Oracle branch.

If this is a machine that can be rebooted, reboot it and see where the = listener reads from them.

Bruce Reardon =20
NOTICE: This e-mail and any attachments are private and confidential and = may contain legally privileged information. If you are not an = authorised recipient, the copying or distribution of this e-mail and any = attachments is prohibited and you must not read, print or act in = reliance on this e-mail or attachments. This notice should not be = removed.

-----Original Message-----
From: =
[]On Behalf Of Jared Still Sent: Monday, 23 February 2004 4:59 AM

Without actually reading the manual and doing any research ( it is Sunday morning, and I don't feel like doing any ) I would say this is to be expected.

tnsnames.ora is used to resolve instance locations on a network. It doesn't really matter which=20 version of client you are using, you want it to follow a certain search order.

On *nix it looks in $HOME/.tnsnames.ora, and then in $TNS_ADMIN/tnsnames.ora, and then in=20 $ORACLE_HOME/network/admin/tnsnames.ora.

There's something similar in Win32, but I forget=20 the location details for the $HOME equiv.

Listener on the other hand should run the listener.ora from the current Oracle home. You could conceivably have several different versions of listener running,=20 each from a different Oracle home.

tnsnames.ora is used to lookup names, listener.ora is used to control the daemon that creates connections to the database. Quite a difference between the two.

I'll leave it to you to verify if this is correct from the fine manual.


On Sat, 2004-02-21 at 02:46, Charu Joshi wrote:
> Hi,


> This is not a critical issue, but important for my understanding.

> OS: NT4
> Multiple Homes: ora_8i_home (d:\ora8i), ora_9i_home(d:\ora9i), and
> 2 others..
> Selected Home: ora_8i_home
> TNS_ADMIN environment variable: d:\ora9i\network\admin

> 1.When I run 'lsnrctl start' command, it reads the
> d:\ora8i\network\admin\listener.ora file.

> 2.If I remove this file and run 'lsnrtctl start', it reads the
> 'd:\ora9i\network\admin\listerner.ora' file.

> In both the above cases, the TNSNames.ora files is read from the
> %TNS_ADMIN% location, but evidently not listerner.ora. Why? It
> seems that lsnrctl is searching in each Oracle Home for
> listerner.ora (as per registry order) and uses the first one that
> it finds.

> There used to be a 7.3.4 client installation on my machine, which
> I removed as per metalink note 73963.1, so that there is no
> DEFAULT_HOME at present. After this, I found that another home
> DEFAULT_HOME1 was automatically added to registry with the same
> path as that of the earlier DEFAULT_HOME. Could this have
> something to do with the anamoly?

> Any ideas/suggestion please?

> Thanks and regards,
> Charu.

> PS: Can we not specify the path of listener.ora explicitly while
> running lsnrctl?

Please see the official ORACLE-L FAQ:

To unsubscribe send email to: put 'unsubscribe' in the subject line.
Archives are at
FAQ is at

Please see the official ORACLE-L FAQ:
To unsubscribe send email to:
put 'unsubscribe' in the subject line.
Archives are at
FAQ is at
Received on Mon Feb 23 2004 - 12:34:30 CST

Original text of this message