Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

About tnsnames.ora and listener

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.
Steven E. Protter
Exalted Contributor

Re: About tnsnames.ora and listener


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.

Steven E Protter
Owner of ISN Corporation
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.
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

Re: About tnsnames.ora and listener

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