Listener

The Listener service runs on the server and listens for requests from clients. By default it operates on TCP Port 1521 but can be reconfigured.

The Listener and TNSName (Transparent Network Substrate) services.

 

The Listener service runs on the server and listens for requests from clients. By default it operates on TCP Port 1521 but can be reconfigured.

 

The database can still open if the listener service isn’t running, however it would only be able to handle local processes and not client requests. It is worth creating a backup listener service in order to maintain healthy communication between clients and servers.

 

If there’s a DNS server is operating in the environment, it needs to be configured with the oracle server host details. Running Windows Internet Name Service (WINS) would ease administration in environments where both Linux and Microsoft systems operate.

Saving the servers information in its own host file would also be helpful.

 

lsnrctl.ora & tnsnames.ora are located within the ORACLE_HOME/network/admin server directory. tnames.ora needs to be located on a client and its contents need to be identical on other instances. (An Oracle client needs to be running on the client machine. TOAD (Tool for Oracle Application Developers) and other management tools require access to the Oracle client.)

 

The tnsnames.ora file on the server is a copy of the file on the Oracle instance.

It’s considered good practice to have a copy of the contents of tnsnames.ora on the client server. Please note that Linux/Unix systems may be case sensitive.

You may set any password in the client tnsnames.ora file. To connect to the server, login with your username in place of “orcl”.

The servers should be registered in the client host

(On Microsoft systems “c:windowssystem32driversetc”, Linux systems “etc”)

The server’s firewall should be configured to respond to requests through TCP Port 1521.

 

If the server is a Linux system and uses iptables: The 1st rule should be allowing requests from x.y.z.w IP addresses

2nd rule: If the firewall uses an iptable and the Oracle server has 192.168.141.130 as its IP address, TCP 1521 requests that arrive from x.y.z.w will be redirected to the Oracle server.

For security reasons both rules should only allow requests from x.y.z.w, allowing the Internet to directly access port 1521 would be risky.

 

The image below is a server’s netstat output, showing that the listener service is inactive.

listener-calismayan

Using the $netstat -ntlp command to view an active listener on port 1521 (3rd line in the Local Address column).
listener-calisan