Operating System - HP-UX
1753809 Members
7480 Online
108805 Solutions
New Discussion юеВ

Re: About tnsnames.ora and listener

 
Kaustubh Kane
Advisor

About tnsnames.ora and listener

Hi All,

When the Oracle is up and running and I make some change in tnsnames.ora, is it necessary to restart the listener for it to pick up the updated tnsnames.ora?

I initially thought that the listener shoudl be restarted to pick up the new changes.
But yesterday I did a change in tnsnames.ora and the change was effective without restarting the listener.

Please let me know.

Thanks and regards,
Kaustubh Kane.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: About tnsnames.ora and listener

Shalom,

Your evidence tells my you don't need to restart the listener.

You need to make sure it WILL start after the change, but you can schedule it.

You can use tnsping to make sure all connections work after your change.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wim Rombauts
Honored Contributor

Re: About tnsnames.ora and listener

File tnsnames.ora is just for oracle-clients looking for a listener to connect them to a database. (listener configuration is in listener.ora)

The listener gets it's databases from the database-instance itself, that does a registration with the listener.

So indeed, when you modifu tnsnames.ora, the client is aware on new rules to connect to (new) databases, but nothing changes for the listener itself.
jamesdba
Occasional Advisor

Re: About tnsnames.ora and listener

No, making changes to the tnsnames.ora will not be picked up by restarting the listener. Restarting the listener will only pick up changes to the listener.ora. If you make changes to the listener.ora, try the following commands to "refresh" the listener process:
oracle> lsncrtl status LISTENER
oracle> lsncrtl reload LISTENER
oracle> lsncrtl status LISTENER
Ben Dehner
Trusted Contributor

Re: About tnsnames.ora and listener

As mentioned by others, you don't need to restart. The listener is completely independent of the tnsnames.ora. Modifiying the tnsnames file has no effect on the listener, so restarting it does nothing.

The listener "listens" for incoming network connections to the database. The databases register themselves through automatic service registration, or they can be manually configured in the listener.ora file. In the latter case, if the listener.ora is modified, you will need to restart.

The tnsnames.ora file is used for resolving database connection strings into the data needed to connect to a database. For a standard TCP connection, this is the (host, port, service_name) of the target database. The tnsnames file is read everytime a new client connection is attempted, so the changes are seen as soon as you update the file.
Trust me, I know what I'm doing
Kaustubh Kane
Advisor

Re: About tnsnames.ora and listener

Thanks a lot for so many replies.
The replies were very informative.