# How can I get the Oracle TNSListener to start after changing my host name?

When running

lsnrctl status


I can see that it is using the old host name, but I don't know where it is pulling that value from.

My Oracle installation is 11.2.0 on Windows7 x64, if that makes any difference.

-

## migrated from serverfault.comJun 6 '12 at 18:24

This question came from our site for system and network administrators.

When you run lsnrctl status, one of the things that it tells you is the location of the Listener Parameter File (the listener.ora file)

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-JUN-2012 13:12:22

STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                06-JUN-2012 09:33:58
Uptime                    0 days 3 hr. 38 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listening Endpoints Summary...
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "jcave11gR2XDB" has 1 instance(s).
Instance "jcave11gr2", status READY, has 1 handler(s) for this service...
Service "jcave11gr2" has 1 instance(s).
Instance "jcave11gr2", status READY, has 1 handler(s) for this service...
The command completed successfully


If you open that file, there will probably be an entry like this

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)


where the host is specified. Change the host there and restart the listener.

-
Thanks worked like a charm... I also had to change a file named tsanames.ora but it was in the same dir so it was easy to find. –  Cristiano Fontes Jun 11 '13 at 7:06