Oracle Listener
Version 11.2.0.3
 
Listener Commands
The listener's involvement is summarized as:
  • the listener catches the request
  • spawns or requests a database process/thread
  • redirects or passes the connection to the process/thread, usually on a different port
  • gets out of the way
change_password

Deprecated in 11.2
set an encrypted listener password
c:\oracle\product\11.2.0\db_1\bin> lsnrctl start
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
LSNRCTL> save_config
Exit quit the listener application
c:\oracle\product\11.2.0\db_1\bin> lsnrctl
LSNRCTL> exit
Help view help information
c:\oracle\product\11.2.0\db_1\bin> lsnrctl help

or

c:\oracle\product\11.2.0\db_1\bin> lsnrctl
LSNRCTL> help
Kill on *NIX ps -ef|grep tnslsnr|awk '{ print $2; }'|xargs kill -9
Quit quit the listener application
c:\oracle\product\11.2.0\db_1\bin> lsnrctl
LSNRCTL> quit
Reload Causes a reread the listener.ora file. Enables the addition or modification of statically configured services without stopping the listener.

In addition, the database services, instances, service handlers, and listening endpoints that were dynamically registered with the listener are unregistered and subsequently registered again.
LSNRCTL> reload
Save Configuration Use the SAVE_CONFIG command to compare the current configuration state of the listener, including trace level, trace file, trace directory, and logging to the listener.ora file. Any changes are stored in listener.ora, preserving formatting, comments, and case as much as possible. Prior to modification of the listener.ora file, a backup of the file, called listener.bak, is created.
LSNRCTL> save_config
Services View the configured listener service
LSNRCTL> serv

LSNRCTL> services
Set
Parameter Syntax & Usage
current_listener set current_listener <listener_name>
LSNRCTL> set current_listener uwlistener
displaymode set displaymode <RAW | COMPAT | NORMAL | VEBOSE>
LSNRCTL> set displaymode VERBOSE
inbound_connect_timeout set inbound_connect_timeout <value>
LSNRCTL> set inbound_connect_timeout 0
log_directory set log_directory <directory_path>
LSNRCTL> set log_directory c:\tmp
log_file set log_file <file_name>
LSNRCTL> set log_file uwlistener.log
log_status set log_status < ON | OFF>
LSNRCTL> set log_status ON
password set password
Deprecated in 11.2
rawmode set rawmode <ON | OFF>
LSNRCTL> set rawmode OFF
save_config_on_stop set save_config_on_stop <ON | OFF>
LSNRCTL> set save_config_on_stop ON
startup_waittime set startup_waittime <value>
LSNRCTL> set startup_waittime 0
trc_directory set trc_directory <directory path>
LSNRCTL> set trc_directory c:\tmp
trc_file set trc_level <file_name>
LSNRCTL> set trc_file uwlistener.trc
trc_level set trc_level <value>
Value Description
0 - 1 off
2 - 3 err
4 - 5 user
6 - 14 admin
15 dev
16 - 99 support
LSNRCTL> set trc_level 0
Show
Parameter Syntax & Usage
current_listener show current_listener <listener_name>
LSNRCTL> show current_listener
displaymode show displaymode
LSNRCTL> show displaymode
inbound_connect_timeout show inbound_connect_timeout
LSNRCTL> show inbound_connect_timeout
log_directory show log_directory
LSNRCTL> show log_directory
log_file show log_file
LSNRCTL> show log_file
log_status show log_status

ON if listener activity is logged
LSNRCTL> show log_status
rawmode show rawmode
LSNRCTL> show rawmode
save_config_on_stop show save_config_on_stop
LSNRCTL> show
snmp_visible show snmp_visible
LSNRCTL> show snmp_visible
startup_waittime show startup_waittime
LSNRCTL> show startup_waittime

Default is 0
trc_directory show trc_directory
LSNRCTL> show trc_directory
trc_file show trc_file

Default is listener.trc
LSNRCTL> show trc_file
trc_level show trc_level
LSNRCTL> show trc_level
Start start the listener
c:\oracle\product\11.2.0\db_1\bin> lsnrctl start
Status view the current listener status
c:\oracle\product\11.2.0\db_1\bin> lsnrctl status
Stop stop the listener
c:\oracle\product\11.2.0\db_1\bin> lsnrctl stop
Trace trace the listener
<[ADMIN | OFF | SUPPORT | USER]> <trace_level>
c:\oracle\product\11.2.0\db_1\bin> lsnrctl trace on 16
Version Show the currently installed listener version
c:\oracle\product\11.2.0\db_1\bin> lsnrctl version
 
Listener Parameters
Prevent remote modification of listener.ora using lsnrctl commands ADMIN_RESTRICTIONS_[listener_name]=<ON | OFF>
ADMIN_RESTRICTIONS_ORABASE=ON
Specifies the base directory in to which tracing and logging incidents are stored when ADR is enabled ADR_BASE<_listener_name>
ADR_BASE_listener=/home/oracle/logs/listener
Connection Rate CONNECTION_RATE_listener_name=<number_of_connections_per_second>
TBD
By default, the Oracle Net listener notifies Cluster Ready Services (CRS) when it is started or stopped CRS_NOTIFICATION_[listener_name]=<ON | OFF>
CRS_NOTIFICATION_LISTENER=ON
Enables users to connect to the database without having to specify a service name from the client DEFAULT_SERVICE_[listener_name]=<service_name>
TBD
Enables/disables ADR for the listener DIAG_ADR_ENABLED<_listener_name> <ON | OFF>
DIAG_ADR_ENABLED_listener=ON
Inbound Connection Timeout INBOUND_CONNECT_TIMEOUT_[listener_name]=<seconds>
INBOUND_CONNECT_TIMEOUT_listener=5
IP ip=<FIRST | V4_ONLY | V6_ONLY>
TBD
Logging logging_<listener_name>=<ON | OFF>
LOGGING_LISTENER=ON
Queue Size Add the queuesize parameter in your listener.ora file in the address description. By default oracle is able to open only 16 simultaneous connections

The result should look like this:
(ADDRESS=
  (PROTOCOL = TCP)(HOST = your-hostname)(PORT = 1521)
  (QUEUESIZE = 30)
)
Rate Limit

Indicates that a particular listening endpoint is rate limited. This is used to prevent denial of service (DOS) attacks on a database or to control a logon storm such as may be caused by a application server reboot.
RECV_BUF_SIZE=<YES | INTEGER>
CONNECTION_RATE_LISTENER=10

LISTENER=
  (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)(RATE_LIMIT=yes))
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1522)(RATE_LIMIT=yes))
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1526))
  )
LISTENER=
  (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)(RATE_LIMIT=8))
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1522)(RATE_LIMIT=12))
    (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1526))
  )
Receive Buffer RECV_BUF_SIZE=<buffer_size_in_bytes>
TBD
Specify if run-time configuration changes are dynamically saved into the listener.ora file SAVE_CONFIG_ON_STOP_[listener_name]=<TRUE | FALSE>
SAVE_CONFIG_ON_STOP=TRUE
Send Buffer SEND_BUF_SIZE=<buffer_size_in_bytes>
TBD
To specify whether a client is authenticated using the Secure Sockets Layer (SSL) SSL_CLIENT_AUTHENTICATION=<TRUE | FALSE>
SSL_CLIENT_AUTHENTICATION=TRUE
To subscribe to Oracle Notification Service (ONS) notifications for downed events SUBSCRIBE_FOR_NODE_DOWN_EVENT
TBD
Adds a timestamp to every trace event in the listener trace file TRACE_TIMSTAMP<_listener_name> <ON | TRUE | OFF | FALSE>
TRACE_TIMESTAMP_LISTENER=TRUE
Trace Levels TRACE_LEVEL<_listener_name> = <value>

Value equivalents:
OFF (equivalent to 0) provides no tracing
USER (equivalent to 4) identify user error error conditions
ADMIN (equivalent to 6) identify installation-specific problems
SUPPORT (equivalent to 16) provides trace information for support


Trace file results are written to $ORACLE_HOME/network/trace.
TRACE_LEVEL_LISTENER = USER
Specify the location of wallets. Wallets are certificates, keys, and trustpoints processed by SSL that allow for secure connections WALLET_LOCATION=
  (SOURCE=
    (METHOD=file)
    (METHOD_DATA=
      (DIRECTORY=directory)
      [(PKCS11=TRUE/FALSE)]))
TBD
 
Listener.ora Samples
Typical Listener.ora file for standalone Oracle.

For a RAC cluster follow the RAC link at page bottom.
# listener.ora Network Configuration File:
# c:\oracle\product\ora10\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\11.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = orabase)
      (ORACLE_HOME = C:\oracle\product\11.2.0\db_1)
    (SID_NAME = orabase)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = perrito4)(PORT = 1521))
    )
  )
)
Local Listener Registration ALTER SYSTEM SET LOCAL_LISTENER='<listener_name>';
ALTER SYSTEM SET LOCAL_LISTENER = 'CDBLISTENER';
Register with the listener ALTER SYSTEM REGISTER;
ALTER SYSTEM REGISTER;
Remote Listener Registration ALTER SYSTEM SET REMOTE_LISTENER='<listener_name>';
ALTER SYSTEM SET REMOTE_LISTENER = 'PDBLISTENER';
 
Related Topics
ADR
NET Services
RAC
 
Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved