Managing Users  «Prev  Next»

Listener Control Program - Exercise

Using the Listener Control Program and Status Command

Objective: Try the Listener Control status command on your system.

Exercise Scoring

You will receive 10 points for this exercise. The exercise is auto-scored; when you have completed the exercise, click the Submit button to receive full credit.

Oracle Listener versus Oracle Connection Manager
The Oracle Net Listener and Oracle Connection Manager are two distinct components, and they are not interchangeable names for the same thing. The listener is a process that runs on the database server, waits for incoming connection requests, and hands each one off to the appropriate database instance. Oracle Connection Manager is a separate, optional proxy component that sits between clients and database servers, providing connection concentration for large numbers of simultaneous clients, access control, and network traffic filtering — and, in current Oracle AI Database 26ai releases, an additional Traffic Director Mode for distributing and load-balancing connections across multiple database instances. Both are part of Oracle Net Services, but they serve different roles and should not be used as synonyms for one another.

The Oracle Listener Control Program: Starting, Stopping, and Monitoring the Listener

The Oracle Listener Control Program (lsnrctl) is the primary tool used to manage Oracle Net Listeners. It is a command-line utility that lets you start, stop, monitor, and configure a listener.

Key commands for managing the listener with lsnrctl:
  • start: Starts the listener process.
  • stop: Stops the listener process.
  • status: Displays the current status of the listener, including:
    1. Listener name
    2. Listening protocol addresses (e.g., TCP/IP, IPC)
    3. Listening ports
    4. Registered database services
    5. Current status (e.g., READY, STOPPED)
  • services: Lists the database services registered with the listener.
  • reload: Reloads the listener configuration from the listener.ora file, without a full stop and restart.
  • trace: Enables or disables listener tracing for troubleshooting.
A few additional commands worth knowing about, beyond the ones you will use in this exercise: SET and its various sub-forms let you modify listener parameters interactively, SAVE_CONFIG writes those changes back to listener.ora so they persist across a restart, and QUIT works identically to EXIT for leaving the program.

To access lsnrctl:
  1. Open a command prompt or terminal window.
  2. Navigate to the $ORACLE_HOME/bin directory (where $ORACLE_HOME is the Oracle home directory containing the listener).
  3. Execute the lsnrctl command followed by the desired command and any necessary options.
Example: To check the status of the default listener, you would type:
lsnrctl status
You have learned the purpose of the Oracle Net Listener, and you have also learned about the Listener Control Program used to start, stop, and monitor it. You have also just had the opportunity to simulate the process of running Listener Control and checking the status of the listener. Now it is time to try it for real.

The Name of the Listener Control Executable

Run the Listener Control program on your system, and try out the status command.

The name of the Listener Control executable is simply lsnrctl, and it has been exactly that name, unchanged, since Oracle8i. It is not version-suffixed and never has been on any release you are likely to encounter: there is no such thing as lsnrctl26 or any similar variant. The only version-suffixed executables that ever existed were relics of releases that predate Oracle8i entirely — lsnrctl30 on Oracle8 release 8.0.x, and lsnrctl23 on Oracle7 release 7.3.x — both from the mid-1990s, and neither appears anywhere in current Oracle documentation. If you ever see a reference to a version-suffixed lsnrctl executable in more recent material, treat it as an error rather than something to look for on your own system.

To access the lsnrctl utility:
  1. Open a command prompt or terminal window.
  2. Navigate to the $ORACLE_HOME/bin directory (where $ORACLE_HOME is the Oracle home directory containing the listener).
  3. Execute the lsnrctl command followed by the desired command (e.g., lsnrctl status, lsnrctl start, etc.).

Submitting your exercise

Click the Submit button after you have successfully executed the status command.