9.5.2 Managing a Listener in an Oracle Restart Configuration
The Oracle Restart feature enhances availability for the processes and applications in a single-instance database environment. The Oracle Restart agents monitor the health of added components by periodically running check operations and restarting the components when necessary.
You can add the listener as a component to the Oracle Restart configuration. The listener is then automatically started by Oracle Restart when it fails or is not running. For example, if you restart the database instance after a planned restart of the computer, then Oracle Restart restarts the listener. Server Control (SRVCTL) is a command-line interface that you can use to manage listeners in an Oracle Restart configuration.
- Viewing Configured Listeners Using the SRVCTL Utility
- Adding or Removing a Listener Using the SRVCTL Utility
- Starting or Stopping a Listener Using the SRVCTL Utility
Parent topic: Administering the Listener
9.5.2.1 Viewing Configured Listeners Using the SRVCTL Utility
To view all configured listeners, use the following command:
% srvctl config listener
See Also:
Oracle Database Administrator's Guide to learn how to configure Oracle Restart and for SRVCTL syntax and semantics
Parent topic: Managing a Listener in an Oracle Restart Configuration
9.5.2.2 Adding or Removing a Listener Using the SRVCTL Utility
Adding a listener as an entry to the grid infrastructure enables the agent to monitor the listener. Similarly, removing a listener removes as an entry. Use the srvctl command at the operating system command line as follows:
-
To add the listener, enter
srvctl add listenerThe following command adds an entry for
listener_sales1to the grid infrastructure:% srvctl add listener -listener listener_sales1
-
To remove the listener, enter
srvctl remove listenerThe following command removes the entry for
listener_sales1from the grid infrastructure:% srvctl remove listener -listener listener_sales1
Parent topic: Managing a Listener in an Oracle Restart Configuration
9.5.2.3 Starting or Stopping a Listener Using the SRVCTL Utility
The SRVCTL utility enables you to stop and start the listener. If you do not specify the -listener parameter, then the SRVCTL utility starts and stops the default listener.
-
To start a listener, enter
srvctl start listenerIn the following example, the first command starts the default listener, and the second command starts
listener1andlistener2:% srvctl start listener % srvctl start listener -listener listener1,listener2
-
To stop a listener, enter
srvctl stop listenerIn the following example, the first command stops the default listener, and the second command stops
listener1andlistener2:% srvctl stop listener % srvctl stop listener -listener listener1,listener2
Parent topic: Managing a Listener in an Oracle Restart Configuration