René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

listener [Oracle NET]

When a client wants to establish a connection to an Oracle Server, it usually first contacts the listener. The listener then creates a foreground process (dedicated mode) or attaches the request to an exising foreground process (shared mode).
The client then directly communicates with that foreground process.
A listener can accept requests for more than one instance. Likewise, more than one listeners can accept requests for the same instance (load balancing).

Service registration

Service registration is a mechanism in which PMON registers information with the listener. This allows the listener to determine which dispatcher can best handle a client connection.

Configuration

The listener must be configured with the following things:
  • Name of the listener (default: listener)
    The name of the listener must be unique on a machine (if there are more than one listeners).
  • (1 or more) listening protocol address
    This is where does the listener listen.
  • Supported services
  • Runtime behavior
    Tracing, timeouts and the like
This configuration goes into a text file called listener.ora.

listener.ora

This is a typical listener.ora file. lsnrctl uses per default listener for listener_name, so use listener there as well, unless some very important reasons require differently.
listener_name = 
    (ADDRESS_LIST =
        (ADDRESS =
           (PROTOCOL=TCP) 
           (HOST=laptop) 
           (PORT=1521)
        )
    )


SID_LIST_listener_name =
  (SID_LIST=
    (SID_DESC=
       (SID_NAME=adpdb)
       (ORACLE_HOME=/home/oracle/OraHome1)
    )
  )

Restricting clients on specific nodes from connecting to the listener

It is possible to prevent certain nodes from connecting to the listener by setting (in the sqlnet.ora file) tcp.validnode_checking to yes and either of tcp.excluded_nodes or tcp.invited_nodes to a list of IP addresses or names of nodes.