Lesson 13 | The Listener Control utility (LSNRCTL) |
Objective | Identify the basic listener control functions. |
Oracle Listener Control utility (LSNRCTL)
The Listener Control utility (LSNRCTL) within Oracle can perform a host of valuable functions. While the most common commands are start and stop, you can also use the LSNRCTL utility to perform tracing,
create pre-spawned listener processes, manage multiple listeners, and lots of other useful functions.
The easiest way to see the commands is to type lsnrctl help .
View the code below to see a sample list of available operations.
dilbert> lsnrctl help
LSNRCTL for IBM/AIX RISC System/6000: Version 2.3.4.0.0 - Production on 11-MAR-4
Copyright (c) Oracle Corporation 1994. All rights reserved.
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* clbstat clbserv
One of the most basic commands is lsnrctl stat, which displays the status of the listener process.
Click the View Code link below to see an example.
dilbert> lsnrctl stat
LSNRCTL for IBM/AIX RISC System/6000: Version 2.3.4.0.0 - Production on 11-MAR-2
Copyright (c) Oracle Corporation 1994. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=tom))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 2.3.4.0n
Start Date 02-MAR-99 07:43:15
Uptime 8 days 23 hr. 26 min. 13 sec
Trace Level off
Security OFF
SNMP ON
Listener Parameter File /etc/listener.ora
Listener Log File /ora7/home/dba/oracle/product/7.3.4/network/log/listeg
Services Summary...
tom has 1 service handler(s)
jerry has 1 service handler(s)
The command completed successfully
Remember that if you are using SQL*Net version 1, the utility is called TCPCTL, not LSNRCTL. Fortunately, the utility directives are largely the same. For example, the command to start the SQL*Net version 1 listener is tcpctl start.
Here we see that the listener is working to receive connections for either the TOM or the JERRY database. We also see the location of the listener.ora file, in case we need to make changes.
The next lesson provides additional information about the listener help facility.