Oracle listener control utility LSNRCTL.
Oracle Listener Help
1. View Available Listener Commands
lsnrctl help command will display all available listener commands. In Oracle 11g following are the available listener commands.
- start – Start the Oracle listener
- stop – Stop the Oracle listener
- status – Display the current status of the Oracle listener
- services – Retrieve the listener services information
- version – Display the oracle listener version information
- reload – This will reload the oracle listener SID and parameter files. This is equivalent to lsnrctl stop and lsnrctl start.
- save_config – This will save the current settings to the listener.ora file and also take a backup of the listener.ora file before overwriting it. If there are no changes, it will display the message “No changes to save for LISTENER”
- trace – Enable the tracing at the listener level. The available options are ‘trace OFF’, ‘trace USER’, ‘trace ADMIN’ or ‘trace SUPPORT’
- spawn – Spawns a new with the program with the spawn_alias mentioned in the listener.ora file
- change_password – Set the new password to the oracle listener (or) change the existing listener password.
- show – Display log files and other relevant listener 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 quit exit set*
show*
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 06-OCT-2016 16:03:14
Uptime 7 days 18 hr. 45 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/DEV12142/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DEV12142)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=DEV12142)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/OWBREPO/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "OWBREPO" has 1 instance(s).
Instance "OWBREPO", status READY, has 1 handler(s) for this service...
Service "OWBREPOXDB" has 1 instance(s).
Instance "OWBREPO", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
The command completed successfully
LSNRCTL> start
Starting /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/DEV12142/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DEV12142)(PORT=1522)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 14-OCT-2016 10:49:12
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/DEV12142/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DEV12142)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
The listener supports no services
The command completed successfully
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
The command completed successfully
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
The listener supports no services
The command completed successfully
LSNRCTL>
LSNRCTL> version
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
TNS for Linux: Version 12.1.0.2.0 - Production
Unix Domain Socket IPC NT Protocol Adaptor for Linux: Version 12.1.0.2.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 12.1.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 12.1.0.2.0 - Production,,
The command completed successfully
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
No changes to save for LISTENER.
The command completed successfully
LSNRCTL> trace user
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
Opened trace file: /u01/app/oracle/diag/tnslsnr/DEV12142/listener/trace/ora_4749_140562098709952.trc
The command completed successfully
LSNRCTL> trace ADMIN
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
Opened trace file: /u01/app/oracle/diag/tnslsnr/DEV12142/listener/trace/ora_4749_140562098709952.trc
The command completed successfully
LSNRCTL> trace SUPPORT
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
Opened trace file: /u01/app/oracle/diag/tnslsnr/DEV12142/listener/trace/ora_4749_140562098709952.trc
The command completed successfully
|
2. Get More help on Specific Listener Command
You can get detailed help on a specific oracle listener command as shown below. In the following example, it gives all the available arguments/parameters that can be passed to the lsnrctl show command.
LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration enable_global_dynamic_endpoint
oracle_home pid
connection_rate_limit valid_node_checking_registration
registration_invited_nodes registration_excluded_nodes
Remote_registration_address
LSNRCTL> show dynamic_registration
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "dynamic_registration" set to ON
The command completed successfully
LSNRCTL> show inbound_connect_timeout
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "inbound_connect_timeout" set to 60
The command completed successfully
LSNRCTL> show current_listener
Current Listener is LISTENER
LSNRCTL> show displaymode
Service display mode is NORMAL
LSNRCTL> show rules
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
No filtering rules currently in effect.
The command completed successfully
LSNRCTL> show log_status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "log_status" set to ON
The command completed successfully
LSNRCTL> show log_directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "log_directory" set to /u01/app/oracle/diag/tnslsnr/DEV12142/listener/alert
The command completed successfully
LSNRCTL> show log_file
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "log_file" set to /u01/app/oracle/diag/tnslsnr/DEV12142/listener/alert/log.xml
The command completed successfully
LSNRCTL> show oracle_home
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
ORACLE_HOME="/u01/app/oracle/product/12.1.0.2/dbhome_1"
The command completed successfully
LSNRCTL> show remote_registration_address
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV12142)(PORT=1522)))
LISTENER parameter "remote_registration_address" set to (REMOTE_REGISTRATION_ADDRESS=OFF)
The command completed successfully
|
No comments:
Post a Comment