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 (OCM)
The nomenclature for the Oracle "listener" in Oracle 12c might not be directly referred to as the Oracle Connection Manager (OCM). Typically, the Oracle "listener" is a separate component responsible for listening to and managing incoming database connection requests. The Oracle Connection Manager (OCM), on the other hand, is a feature within Oracle Network Services that acts as a router and provides advanced networking functionalities, such as connection concentration and multiplexing. While both are part of Oracle Network Services, they serve distinct roles and are usually referred to by their specific names, rather than interchangeably.

"Oracle Listener Control Program" used to start, stop, and monitor the "Oracle Listener"

The Oracle Listener Control Program (lsnrctl) is the primary tool used to manage Oracle Listeners. It's a command-line utility that allows you to perform various tasks related to the listener, including starting, stopping, monitoring, and configuring it. Here's a visual overview of how lsnrctl interacts with the Oracle Listener:
Key commands for managing the listener using 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.
  • trace: Enables or disables listener tracing for troubleshooting.
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 Listener, and you have also learned about the "Listener Control Program" that is used to start, stop, and monitor the Net Listener. 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.

Name of the "Listener Control Executable" in Oracle 12c

Run the Listener Control program on your system, and try out the status command.
The name of the Listener Control executable in Oracle 12c is simply lsnrctl.
Here's a breakdown of the naming conventions for different Oracle versions:
  • Oracle 11g and earlier: The executable was named `lsnrctl` followed by a version number (e.g., `lsnrctl11g` for Oracle 11g).
  • Oracle 12c and later: The executable is uniformly named `lsnrctl` across all versions.
To access the lsnrctl utility in Oracle 12c:
  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.).

On Unix and Windows versions after the Oracle 9i release installed, the command is lsnrctl.

Submitting your exercise

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