Oracle only listens to localhost

It happens to me quite often. I install Oracle and it only listens to the localhost. In a few steps, one can get it to listen to the IP address instead of the localhost.

What is the problem if Oracle only listens to the localhost? This implies that the instance cannot be accessed from outside. The Oracle server simply doesn’t listen to outside clients.

The first step is to change the listener.ora (can be found in network\admin) where localhost is replaced by the IPaddress:

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

Similarly, we change the settings in tnsnames.ora. This will then look like:

LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.26)(PORT = 1521))ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )

ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.26)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )

Restart the engine, and let us see if we on the server are able to access the instance on the Ip address. That works, both from the tnsping command and the enterprise manager app:

tnsping and EM

The server must then be given access through the firewall. This can be accomplished to provide access through the firewall for TNSLISTENER (can be found in ORAHOME\bin).

access for TNSLISTENER.

Door tom