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).

Getting started[edit]

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*


Lsnrctl commands[edit]

Start a listener[edit]

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

lsnrctl> start listener_name

Check listener status[edit]

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

lsnrctl> status listener_name

Check registered services[edit]

To see what database services is registered with a listener:

lsnrctl> services listener_name

Stop a listener[edit]

To stop a database listener:

lsnrctl> stop listener_name

Reload a listener[edit]

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

lsnrctl> reload listener_name


McTns is a Windows lsnrctl-like program which requires no Oracle client or server. You can post comments in Forum topic: McTns: a lsnrctl-like program for Windows.

Also see[edit]