Managing Users  «Prev  Next»

Lesson 3Finding the listener service (Windows only)
ObjectiveView the current status of the listener service.

Finding Oracle listener Service

Here are a few different ways you can check the status of your Oracle 19c listener service on Windows Server 2019:
  1. Using the Windows Services Management Console
    • Open the Run dialog: Press the Windows key + R.
    • Type services.msc and press Enter.
    • Locate the Oracle listener service: Services are typically named with a pattern like "OracleOraDB19Home1TNSListener".
    • Check the "Status" column:
      • "Running" indicates the listener is operational.
      • "Stopped" indicates the listener is not running.
  2. Using the Listener Control Utility (LSNRCTL)
    • Open a command prompt or terminal window.
    • Set Oracle environment variables: Run the `oraenv` command if needed (your Oracle installation directory will determine the exact command).
    • Issue the STATUS command: Type `lsnrctl status` and press Enter. This will provide detailed information about the listener status.
  3. Using the Net Services Control Utility (NETCA)
    • Launch the Net Configuration Assistant: Search for it in the start menu or find it in your Oracle Home directory.
    • Navigate to the Listener Configuration section.
    • View the Current Listener Status: The Net Configuration Assistant will display if your listener is running or not.

Example Output (LSNRCTL STATUS)
LSNRCTL for 64-bit Windows: Version - Production on 21-MAR-2024 11:55:17

Copyright (c) 1991, 2019, Oracle and/or its affiliates.  All rights reserved.

Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version - Production
Start Date                20-MAR-2024 23:30:55
Uptime                    0 days 12 hr. 24 min. 22 sec
... (more output)

Default listener service for an Oracle Database on a Windows Server after installation

Under Windows, the Oracle Net Listener is implemented as a Windows Service. The following simulation will show you how to stop, start, and view the current status of this service. If you are running Unix, you should still do this simulation for the sake of general knowledge The default listener service for an Oracle database installed on a Windows Server is known as "OracleTNSListener". Upon the successful installation of an Oracle database, the Oracle Net Listener service, commonly referred to as OracleTNSListener, is automatically configured. This listener service plays a vital role in the network communication between a client and an Oracle server. The OracleTNSListener service is specifically designed to handle incoming client connection requests for Oracle server processes over Oracle Net. It listens for and manages traffic over the designated network protocols, thus providing seamless connectivity between the client and the Oracle database. This service can typically be found running as a background process on the Windows Server, allowing Oracle databases to receive and respond to requests from remote locations. It is crucial for database administrators to ensure that the OracleTNSListener service is always running, as its unavailability may disrupt the connectivity, causing potential disruptions in database services.
If you have done a default Oracle install on Windows Server, you should have a listener service named OracleOraHome11TNSListener, it should be started, and the startup mode should be automatic. Under Unix, to see the status of the listener, you would run listener control, and issue the status command. Go ahead and look for the listener service on your system right now.

Listener Direct Hand-Off Information

The listener records direct hand-off events to dispatchers. These events are formatted into the following fields:
Timestamp * Presentation * Handoff * Error Code

Properties of direct hand-off fields are as follows:
  1. Each field is delimited by an asterisk (*).
  2. A successful connection or command returns a code of zero.
  3. A failure produces a code that maps to an error message.
Example Listener Log Event for Direct Hand-Off shows a direct hand-off event in the log file.
21-MAY-2012 10:54:55 * * handoff * 0

Listener Subscription for ONS Node Down Event Information
The listener subscribes to the Oracle Notification Service (ONS) node down event on startup if the ONS configuration file is available. This subscription enables the listener to remove the affected service when it receives node down event notification from ONS. The listener uses asynchronous subscription for the event notification. The following warning message is recorded to the listener log file on each STATUS command if the subscription has not completed, such as the ONS daemon is not running on the host.
WARNING: Subscription for node down event still pending and the listener cannot receive the ONS event while subscription is pending.
Other than that, no other listener functionality is affected.

Listener Oracle Clusterware Notification Information

If the required Oracle Clusterware (shown as CRS in the following log messages) libraries are installed and Oracle Clusterware is started on the host, then Oracle Listener will notify Oracle Clusterware about its status during start and stop processes. After successful notification, listeners record the event in the log and no message is recorded if the notification fails.
Listener completed notification to CRS on start
Listener completed notification to CRS on stop

SEMrush Software