In what situation to have listener entry in the tnsnames.ora

I found that all of my databases at the new shop has the listener entry (LISTENER_DATABASE_NAME) in the tnsnames.ora.
What may be the requirement of this setting? I am curious to know why it is required or is this at all required. How the connections will be affected using this entry?
example:---
vi tnsnames.ora

ADPPRD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ADPPRD)
    )
  )
LISTENER_ADPPRD =
  (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))
OranewAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
listener is for database servers.  It allows for network connections to the database.

tnsnames.ora is a client config file that tells the client where the listener is.

That said:Oracle is client server out of the box so the database server also has a tnsnames.ora file in most cases.
0
OranewAuthor Commented:
Hi Slightwv,
May be I did not ask in a right way. Let me explain it again
The server has both the listener.ora and tnsnames. ora files.
The tnsnames should be  sufficient as below:-
ADPPRD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ADPPRD)
    )
  )

But I have the extra entry also (like this below which starts from LISTENER_) in the tnsnames.ora file. What is the need for this extra lines from (LISTENER_ADPPRD)?

ADPPRD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ADPPRD)
    )
  )
LISTENER_ADPPRD =
  (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))


---------------------------------
What is the need of this extra entry in the tnsnames.ora file??
****
LISTENER_ADPPRD =
  (ADDRESS = (PROTOCOL = TCP)(HOST = adprdb01)(PORT = 1521))
****
0
slightwv (䄆 Netminder) Commented:
I cannot find the exact description in the online docs (I'm still learning how to get around in the new documentation layout).

It is a server side entry in the tnsnames.ora file that helps with non-standard listeners when the LOCAL_LISTENER isn't set in the database instance itself and seems to also aid in RAC implementations.

From what I can find, it is added by dbca (database configuration assistant).

Best I can find in the docs was this:
https://docs.oracle.com/html/B14406_01/undrstnd.htm

Nondefault listeners

Where listener_sid is resolved to a listener address through a naming method such as a tnsnames.ora file.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

OranewAuthor Commented:
Update:-- the above file is just the tnsnames.ora . Do you need the listener.ora also in order to answer this question?
0
slightwv (䄆 Netminder) Commented:
>>Do you need the listener.ora also in order to answer this question?

No.
0
ora-600Oracle Database AdministratorCommented:
Hello Oranew,

let me first explain the database initialization parameter "local_listener":
If you leave this parameter empty the database (starting with Oracle 10g) automatically registers itself at the listener which is running on local port 1521. If you have multiple listeners on your database server you can configure "local_listener" to a different listener. When setting local_listener = 'LISTENER_ADPPRD' the database will try to register itself at the listener which is defined in the tnsnames.ora entry.

In other words: You need the LISTENER_<ORACLE_SID> entry if you want a database to connect to a different listener than the default listener. In you case LISTENER_ADPPRD points to the default listener.

If you want to remove the entry then please check the database parameter "local_listener" (Same applies to "remote_listener").

Best Regards!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark GeerlingsDatabase AdministratorCommented:
Our tnsnames.ora files on our Oracle11g database servers also have a line like that (LISTENER_DATABASE_NAME), so that appears to be the default in Oracle11.  But, I don't know if this entry is required or how it may be used.   I also don't know what happens if you change your listener name for some reason without changing this value.

Maybe this entry helps me understand a problem we had recently (and a different question here also referred to recntly).  That is: lots of errors reported in the listener.log file from a jdbc connection attempt from the local OEM db console on the server that fail with TNS-12514 errors.
0
OranewAuthor Commented:
Thanks everyone who participated on this question. Thanks for nice explanation
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.