Thursday, August 27, 2009

lsnrctl

The lsnrctl utility manages the Oracle listener processes. The Oracle listener process is required for database applications to access the database through SQL*Net or Net8. lsnrctl requires entries in the listener.ora file that specify the port for that listener. The listener.ora file is the configuration file for the network listener. It resides on the server and defines the network listener address, the SID for the database for which it listens, and other optional parameters for tracing and logging.



The lsnrctl command can be executed without parameters, in which the lsnrctl shell will be invoked, or it can execute commands directly when specified on the command line.



$lsnrctl

LSNRCTL for Solaris: Version 10.2.0.4.0 - Production on 27-AUG-2009 18:04:02

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

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*



set – Changes the value of any parameter. Everything that can be shown can be set.
show – Displays current parameter settings.



The start command will start the default listener (named LISTENER); otherwise the name can be specified as the second parameter. Once started, the status can be determined using the status command:

LSNRCTL> status

it display listnername,version,start date,uptime,log file etc.

if the status command display as "NO Listener" then you can start the listenr using "start" command as below.

LSNRCTL> start

same way you can stop the listener as below:

LSNRCTL> stop



on unix box you can verify the listener service is up and runnign as below:

ps -ef grep tnslsnr

No comments:

Post a Comment