https://www.bnl.gov/phobos/Detectors/Computing/Orant/doc/network.804/a48385/ch5.htm
Using the Listener Control Utility
The network listener establishes listen endpoints on a machine. These listen endpoints are well-known addresses that clients and servers use to connect to a database. The Listener Control Utility, LSNRCTL, is a tool that you run from the operating system prompt to start and control the listener. For SQL*Net use, the general form of the Listener Control Utility is:
LSNRCTL command [listener_name]
LSNRCTL
Specifies the name of the tool that controls the listener. In some operating systems, this fixed parameter is case sensitive. If the operating system is case sensitive, enter LSNRCTL in lowercase.
command
Specifies the action to be performed.
listener_name
Specifies the listener name defined in LISTENER.ORA. If listener_name is not included, the default value LISTENER is used.
Commands for LSNRCTL Information
The Listener Control Utility has three commands that provide information about LSNRCTL itself. These commands are HELP, SET, and SHOW.
HELP : HELP provides a list of all the LSNRCTL commands available. An example follows:
LSNRCTL> help
The following operations are available
An asterisk (*) denotes a modifier or extended command:
start stop status
services version reload
trace spawn dbsnmp_start
dbsnmp_stop dbsnmp_status change_password
quit exit set*
show*
SET: This command lists the operations that can be set using the SET command.
LSNRCTL> set
The following operations are available after set
An asterisk (*) denotes a modifier or extended command:
password trc_file trc_directory
trc_level log_file log_directory
log_status current_listener connect_timeout
startup_waittime use_plugandplay
SHOW: This command lists the operations that can be set using the SHOW command.
LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
trc_file trc_directory trc_level
log_file log_directory log_status
current_listener connect_timeout startup_waittime
snmp_visible use_ckpfile use_plugandplay
Stopping the Listener
To stop the default listener, use the command:
LSNRCTL STOP
To stop a running listener defined in LISTENER .ORA as TCP_LSNR, use the command:
LSNRCTL STOP TCP_LSNR
You can then stop the listener from the command line by entering:
LSNRSTOP
Start the Listener
to start a default listener (which is a listener defined in a LISTENER.ORA file with the alias LISTENER):
LSNRCTL START
To start a non-default listener:
LSNRCTL START listener_name
Checking Listener Status
LSNRCTL STATUS
Retrieving Listener Services
LSNRCTL> SERVICES
No Comments