Oracle Database - Listener

Card Puncher Data Processing


When an database instance starts, it registers itself with a listener using one or more service names. When a client program or database connects to a listener, it requests a connection to a service.

A service name can identify multiple database instances, and an instance can belong to multiple services.

For this reason, the listener acts as a mediator between the client and instances and routes the connection request to the appropriate instance. Clients connecting to a service need not specify which instance they require.

To connect to a database service, clients first contact a listener process that typically resides on the database server. The listener receives incoming client connection requests and sends these requests to the database server. After the connection is established, the client and database server communicate directly.

The listener knows which services can handle connection requests because an Oracle database dynamically registers this information with the listener. This process of registration is called service registration. Registration also provides the listener with information about the database instances and the service handlers available for each instance.

Listener in an connection request

When the listener receives the client request, it selects one of the registered service handlers. Depending on the type of handler selected, the communication protocol used, and the operating system of the database server, the listener performs one of the following actions:

  • Hands the connect request directly off to a disptacher.
  • Sends a redirect message back to the client with the location of the dispatcher or dedicated server process. The client then connects directly to the dispatcher or dedicated server process.
  • Spawns a dedicated server process and passes the client connection to the dedicated server process.

After the listener has completed the connection operation for the client, the client communicates directly with the Oracle database without the listener's involvement. The listener resumes listening for incoming network sessions.

The process in the 3 steps:

  • 1. The client sends a connection request to the listener.
  • 2. The listener parses the client request and forwards it to the service handler for the database service requested.
  • 3. The client connects to the database.

Oracle Database Listener

Listener Management


A listener is configured with one or more listening protocol addresses, information about supported services, and parameters that control its run-time behavior. The listener configuration is stored in a configuration file named listener.ora.

To know more about the listener configuration, see this article: Oracle Database - Configuration of the Listener (listener.ora)


  • Windows: Restart the listener service. Example : “OracleOraDb10g_home1TNSListener”

Listener Services

  • linux:
./lsnrclt stop
./lsnrclt start

Useful Command

lsnrctl status
lsnrctl service

Tracing and Logging

To set tracing parameters with Oracle Enterprise Manager and Oracle Net Manager:

Oracle Net Manager

  1. Start Oracle Net Manager.
  2. In the navigator pane, expand Local > Profile.
  3. From the list in the right pane, select General.
  4. Click the Tracing tab.
  5. Specify the settings (see help for the setting)
  6. Choose File > Save Network Configuration.

This action add this line in the sqlnet.ora by example for the level admin : TRACE_LEVEL_SERVER = ADMIN

sqlnet.trc (for the client)
svr_pid.trc (for the server)

The default directory is ORACLE_HOME\network\trace.

Oracle Enterprise Manager

  1. Access the Oracle Net Administration page in Oracle Enterprise Manager.
  2. Select Listeners from the Administer list, and then select the Oracle home that contains the location of the configuration files.
  3. Click Go. The Listeners page appears.
  4. Select a listener, and then click Edit. The Edit Listeners page appears.
  5. Click the Logging & Tracing tab.
  6. Specify the settings.
  7. Click OK.



Log Directory

  • ORACLE_HOME\network\trace
  • ORACLE_HOME\network\log

Documentation / Reference

Discover More
IpTables Firewall

iptables is a Firewall and NAT service used as backend by firewalld. The actual iptables rules are created and customized on the command line with the command : iptables for IPv4 and ip6tables for...
Linux - The DNS resolver (/etc/resolv.conf)

The file /etc/resolv.conf is used by the resolver. Two Domain Name System (DNS) resolver parameters (timeout and attempts) are set by default to low values when the operating system is installed. Typical...
Nmap Open Port Computer
Network - Nmap to (discover|scan) the open port / service

Nmap (“Network Mapper”) is a free and open source (license) utility for network exploration or security auditing that permits to query open port Linux Windows. Download...
Card Puncher Data Processing
Oracle Database - Configuration of the Listener (listener.ora)

A listener is configured with one or more listening protocol addresses, information supported services, and parameters that control its run-time behavior. The listener configuration is stored in the configuration...
Card Puncher Data Processing
Oracle Database - Connect Descriptor (TNS Connect String)

The Connect Descriptor (known also as TNS Connect String) is a type of connect identifier. It defines the parameters that need the Oracle Net Service to connect to a database service : the protocol...
Card Puncher Data Processing
Oracle Database - Connect String (Client Connection Initiation)

Users initiate a connection request to a database service by providing a connect string. A connect string includes: a username and password, along with a connect identifier. A connect identifier...
Oracle Database One Service For Each Database
Oracle Database - Database Service

An Oracle database is represented to clients as a service. A database can have one or more services associated with it. When an instance starts, it registers itself with a listener using one or more service...
Oracle Database Dedicated Server
Oracle Database - Dedicated Server Process

In a dedicated server configuration, the listener starts a separate dedicated server process for each incoming client connection request dedicated to servicing the client. After the session is complete,...
Oracle Database Net Ldap
Oracle Database - Directory naming method (LDAP-compliant)

A naming method that resolves a database service, net service name, or net service alias to a connect descriptor stored in a central directory server. The directory naming method stores connect identifiers...
Hs Odbc Excel Define Name
Oracle Database - How to read data through an ODBC connection with Gateway (Heterogeneous services)

This article is aimed to show how you can access data from oracle database via an odbc connection direct by using the gateway odbc agent (or program) generic connectivity. In this example, an odbc connection...

Share this page:
Follow us:
Task Runner