Lsnrctl

From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽

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

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 10.2.0.1.0 - Production on 06-MAR-2008 15:57:02
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL>
LSNRCTL> help
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> exit

Lsnrctl commands

Start a listener

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

lsnrctl> start listener_name

Check listener status

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

lsnrctl
lsnrctl> status listener_name

Check registered services

To see what database services is registered with a listener:

lsnrctl> services listener_name

Stop a listener

To stop a database listener:

lsnrctl> stop listener_name

Reload a listener

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

lsnrctl> reload listener_name

Utilities

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