To see
the available command in listener control utility:
LSNRCTL>
HELP
The
following operations are available
An
asterisk (*) denotes a modifier or extended command:
exit
quit
reload
services
set*
show*
spawn
start
status
stop
trace
version
RELOAD
To reread the
listener.ora
file. This command
enables you to add or change statically configured services without actually
stopping the listener.
Syntax
From the operating system:
lsnrctl RELOAD listener_name
From the
Listener Control utility:
LSNRCTL> RELOAD listener_name
To obtain detailed information about the database
services, instances, and service handlers (dispatchers and dedicated servers)
to which the listener forwards client connection requests.
SET LOG_DIRECTORY
Purpose
To set
destination directory where the listener log file is written. By default, the
log file is written to the
ORACLE_HOME/network/log
directory.
Syntax
From the
operating system:
lsnrctl SET LOG_DIRECTORY directory
From the
Listener Control utility:
LSNRCTL> SET LOG_DIRECTORY directory
Example
LSNRCTL> SET LOG_DIRECTORY /usr/oracle/admin
Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521))
LISTENER parameter "log_directory" set to /usr/oracle/admin
The command completed successfully
SET LOG_FILE
Purpose
To set the
name for the listener log file. By default, the log file name is
listener.log
.
Syntax
From the
operating system:
lsnrctl SET LOG_FILE file_name
From the
Listener Control utility:
LSNRCTL> SET LOG_FILE file_name
SET
LOG_STATUS
To turn
listener logging on or off.
Syntax
From the
operating system:
lsnrctl SET LOG_STATUS {on | off}
From the
Listener Control utility:
LSNRCTL> SET LOG_STATUS {on | off}
SET
SAVE_CONFIG_ON_STOP
To specify
whether changes made to the parameter values for the listener by the SET commands are to be saved to the
listener.ora
file at the time the listener is stopped with the STOP command.
From the
operating system:
lsnrctl SET SAVE_CONFIG_ON_STOP {on | off}
From the
Listener Control utility:
LSNRCTL> SET SAVE_CONFIG_ON_STOP {on | off}
SET
TRC_DIRECTORY
Purpose
To set the
destination directory where the listener trace files are written. By default,
the trace file are written to the
ORACLE_HOME/network/trace
directory.
Syntax
From the
operating system:
lsnrctl SET TRC_DIRECTORY directory
From the
Listener Control utility:
LSNRCTL> SET TRC_DIRECTORY directory
SET
TRC_FILE
Purpose
To set the
name of the listener trace file. By default, the trace file name is
listener.trc
.
Syntax
From the
operating system:
lsnrctl SET TRC_FILE file_name
From the
Listener Control utility:
LSNRCTL> SET TRC_FILE file_name
SET
TRC_LEVEL
To set a
specific level of tracing for the listener.
Syntax
From the
operating system:
lsnrctl SET TRC_LEVEL level
From the
Listener Control utility:
LSNRCTL> SET TRC_LEVEL level
level: One of the following trace levels:
·
off
for no trace output
·
user
for user trace information
·
admin
for administration trace information
·
support
for Oracle Support Services trace information
SHOW
To view the
current parameter values for the listener.
All of the SET parameters
have equivalent
SHOW
parameters.
Syntax
From the operating system:
lsnrctl SHOW parameter
From the Listener Control utility:
LSNRCTL> SHOW parameter
SPAWN
To start a program stored on the computer on which the listener is
running, and which is listed with an alias in the
listener.ora
file.
Syntax
From the
operating system:
lsnrctl SPAWN listener_name alias (arguments='arg1,arg2,...')
From the Listener
Control utility
LSNRCTL> SPAWN listener_name alias (arguments='arg1,arg2,...')
listener_name: The listener name, if the default name of
LISTENER
is not used.
alias: The alias of the program to be spawned off is specified by a
listener.ora
file entry, similar to
the following:alias = (PROGRAM=(NAME=)(ARGS=)(ENVS=))
For example:
nstest = (PROGRAM=(NAME=nstest)(ARGS=test1)(ENVS='ORACLE_HOME=/usr/oracle'))
This program
can then be spawned off using the following command:
lsnrctl SPAWN listener_name nstest
START
To start the named listener.
From the operating system:
lsnrctl
START listener_name
From the Listener Control utility:
LSNRCTL>
START
listener_name
LSNRCTL>
START
tcp_lsnr
To display basic status information about a listener,
including a summary of listener configuration settings, listening protocol
addresses, and a summary of services registered with the listener.
From the operating system:
lsnrctl
STATUS listener_name
From the Listener Control utility:
LSNRCTL>
STATUS
listener_name
To stop the named listener.
From the operating system:
lsnrctl
STOP listener_name
From the Listener Control utility:
LSNRCTL>
STOP
listener_name
To turn on tracing for the listener.
From the operating system:
lsnrctl
trace level listener_name
From the Listener Control utility:
LSNRCTL>
trace
level listener_name
level: One of the following trace levels:
- off for
no trace output
- user for
user trace information
- admin for
administration trace information
- support for
Oracle Support Services trace information
listener_name: Specify the listener
name, if the default name of LISTENER is not used.
This command has the same functionality as SET
TRC_LEVEL command.
LSNRCTL>
TRACE
ADMIN lsnr
Connecting
to (ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521))
Opened
trace file: /oracle/network/trace/listener.trc
The
command completed successfully
To display the current version of Listener Control
utility.
From the operating system:
lsnrctl
VERSION listener_name
From the Listener Control utility:
LSNRCTL>
VERSION
listener_name
Comments
Post a Comment