From Oracle FAQ
Jump to: navigation, search

lsnrctl (Listener Control) is an SQL*Net utility used for controlling database listeners. A listener is required for allowing remote (not local) clients to connect to the Oracle database via the network. This utility cannot create or configure listeners, but provides commands to control listener functions such as starting and stopping listeners, reporting the status of listeners, changing parameter listener settings, etc.

In the examples below, listener_name will refer to the name of the listener as defined in the listener.ora file. If you have not changed the listener's name, then it would be called LISTENER (the default).


[edit] Getting started

Invoke the "lsnrctl" utility from the command line. Here is a Unix/ Linux example - printing the help screen and exit:

$ lsnrctl
LSNRCTL for Solaris: Version - Production on 06-MAR-2008 15:57:02
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
The following operations are available
An asterisk (*) denotes a modifier or extended command:

start               stop                status
services            version             reload
save_config         trace               spawn
change_password     quit                exit
set*                show*


[edit] Lsnrctl commands

[edit] Start a listener

If the listener has not been started, start it with the command:

lsnrctl> start listener_name

[edit] Check listener status

Check if a listener has been started on the remote node. Check the status with the STATUS command:

lsnrctl> status listener_name

[edit] Check registered services

To see what database services is registered with a listener:

lsnrctl> services listener_name

[edit] Stop a listener

To stop a database listener:

lsnrctl> stop listener_name

[edit] Reload a listener

To reload a database listener (stop and restart without disrupting the service):

lsnrctl> reload listener_name

[edit] Also see