Home » Other » Marketplace » McTns: a lsnrctl-like program for Windows (8iR1 to 18c)
() 1 Vote
McTns: a lsnrctl-like program for Windows [message #649195] |
Thu, 17 March 2016 04:12 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
I have posted a lsnrctl-like program in our lsnrctl wiki page.
This is a Windows stand-alone program which requires no Oracle client (or rather server as lsnrctl utility is now only in the server delivery).
The help is the following one:
C:\>McTns -h
McTns Version 2018.12.11 - Copyright (c) Michel Cadot, 2016-2018. All rights reserved.
Usage: McTns.exe
{ -h |
[-dir <listener.ora directory>] [-tim <timeout>]
[[<command> [<parameter> [...]]] { <listener name> | <host>:<port> }]
}
with
-dir <directory> Gives the directory for listener.ora file.
-h Displays the version and the usage help.
-tim <timeout> Gives the timeout (in seconds) on connection to listener,
default is 5 seconds.
<command> [<parameter>] Gives the listener command to execute and its parameters.
<listener name> Gives the listener name.
<host>:<port> Gives the server name or IP and port of the listener.
If a listener name is given, the program searches for listener.ora file:
* if "-dir" option is given, in this directory.
* otherwise, first in TNS_ADMIN directory if set, then in ORACLE_HOME/network/admin.
Note: PROTOCOL, HOST and PORT must be given in this order in the listener entry
description (program restriction).
The program is provided as it is without any guarantees or warranty. Although the
author has attempted to find and correct any bugs in this free program, the author
is not responsible for any damage or losses of any kind caused by the use or misuse
of the program. The author is under no obligation to provide support, service,
corrections, or upgrades to this program.
You can freely use, copy and distribute this program but you can't modify it without
the permission of the author you can contact on http://www.orafaq.com
You can post your comments, ask for improvements, report bugs... on the program at
http://www.orafaq.com/forum/t/200306/
I encourage you to subscribe to this topic (link at top of the page) if you want to
be informed when a new version is released.
Here are two examples of its usage compare to the same lsnrctl output.
lsnrctl
C:\>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.2.0.4.0 - Production on 17-MARS -2016 09:46:08
Copyright (c) 1991, 2013, 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 change_password
quit exit set*
show*
LSNRCTL> help set
The following operations are available after set
An asterisk (*) denotes a modifier or extended command:
password rawmode
displaymode trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
save_config_on_stop dynamic_registration
enable_global_dynamic_endpoint connection_rate_limit
valid_node_checking_registration registration_invited_nodes
registration_excluded_nodes
LSNRCTL> help 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
McTns
C:\>McTns
McTns Utility by Michel Cadot: Version 2018.12.11
Copyright (c) Michel Cadot, 2016-2018. All rights reserved.
Welcome to McTns, type "help" for information.
Used parameter file: E:\oracle\ora11204\network\admin\listener.ora
Found LISTENER entry:
(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=((PROTOCOL=TCP))(HOST=myserver)(PORT=1531)))(
ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC112)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=NMP)(HOST=192
.168.1.9)(PIPE=michel)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=myserver)(PORT=7777)))))
Current Listener is LISTENER
McTns> help
The following operations are available
An asterisk (*) denotes a modifier or extended command:
change_password exit help* ping
reload quit save_config servacls
services set* show* spawn
start status stop trace
version
McTns> help set
The following operations are available after set:
connection_rate_limit connect_timeout current_listener
displaymode dynamic_registration enable_global_dynamic_endpoint
inbound_connect_timeout listener_directory log_directory
log_file log_status password
rawmode registration_excluded_nodes registration_invited_nodes
remote_registration_address save_config_on_stop startup_waittime
timeout trc_directory trc_file
trc_level use_plugandplay valid_node_checking_registration
McTns> help show
The following operations are available after show:
all connection_rate_limit connect_timeout
current_listener displaymode dynamic_registration
enable_global_dynamic_endpoint inbound_connect_timeout listener_directory
log_directory log_file log_status
oracle_home password pid
rawmode registration_excluded_nodes registration_invited_nodes
remote_registration_address rules save_config_on_stop
snmp_visible startup_waittime timeout
trc_directory trc_file trc_level
use_plugandplay valid_node_checking_registration
lsnrctl
C:\>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.4.0 - Production on 17-MARS -2016 10:39:31
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 13-MARS -2016 20:50:54
Uptime 3 days 13 hr. 48 min. 36 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)(PORT=1531)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC112ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=nmp)(PIPENAME=\\.\pipe\michel)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myserver)(PORT=7777)))
Services Summary...
Service "MIKB2XDB.myserver" has 1 instance(s).
Instance "MIKB2", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "mik8.myserver" has 1 instance(s).
Instance "mik8", status UNKNOWN, has 1 handler(s) for this service...
Service "mik9.myserver" has 1 instance(s).
Instance "mik9", status UNKNOWN, has 1 handler(s) for this service...
Service "mika.myserver" has 1 instance(s).
Instance "mika", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb.myserver" has 1 instance(s).
Instance "mikb", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb2.myserver" has 2 instance(s).
Instance "MIKB2", status READY, has 2 handler(s) for this service...
Instance "mikb2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
McTns
C:\>McTns status
McTns Utility by Michel Cadot: Version 2016.03.17
Copyright (c) Michel Cadot, 2016. All rights reserved.
Used parameter file: E:\oracle\ora11204\network\admin\listener.ora
Found LISTENER entry:
(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=((PROTOCOL=TCP))(HOST=myserver)(PORT=1531)))
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC112)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=NMP)(HOST=
192.168.1.9)(PIPE=michel)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=myserver)(PORT=7777)))))
Current Listener is LISTENER
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
----------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 13-MARS -2016 20:50:54
Uptime 3 days 13 hr. 50 min. 49 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)(PORT=1531)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC112ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=nmp)(PIPENAME=\\.\pipe\michel)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myserver)(PORT=7777)))
Services Summary...
Service "MIKB2XDB.myserver" has 1 instance(s).
Instance "MIKB2", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "mik8.myserver" has 1 instance(s).
Instance "mik8", status UNKNOWN, has 1 handler(s) for this service...
Service "mik9.myserver" has 1 instance(s).
Instance "mik9", status UNKNOWN, has 1 handler(s) for this service...
Service "mika.myserver" has 1 instance(s).
Instance "mika", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb.myserver" has 1 instance(s).
Instance "mikb", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb2.myserver" has 2 instance(s).
Instance "MIKB2", status READY, has 2 handler(s) for this service...
Instance "mikb2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Note: the program currently supports only remote access, or local one for listener with local security off.
Note: the program also knows a "show all" command which allows to get all current session and listener parameters in a single command:
McTns> show all
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver(PORT=1531)))
parameter "connection_rate_limit" set to 0
Current Listener is LISTENER
Display mode is NORMAL
parameter "dynamic_registration" set to ON
parameter "enable_global_dynamic_endpoint" set to OFF
parameter "inbound_connect_timeout" set to 60
Listener.ora directory is
parameter "log_directory" set to E:\Oracle\diag\tnslsnr\myserver\listener\alert
parameter "log_file" set to E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
parameter "log_status" set to ON
ORACLE_HOME="E:\Oracle\Ora11204"
Password is
PID=(5432)
Raw mode is OFF
parameter "registration_excluded_nodes" set to
parameter "registration_invited_nodes" set to
No filtering rules currently in effect.
parameter "save_config_on_stop" set to OFF
parameter "snmp_visible" set to OFF
parameter "startup_waittime" set to 0
Time-out is 5 seconds
parameter "trc_directory" set to E:\Oracle\diag\tnslsnr\myserver\listener\trace
parameter "trc_file" set to ora_5432_628.trc
parameter "trc_level" set to off
parameter "valid_node_checking_registration" set to off
The command completed successfully
Note: A difference with lsnrctl is that you can send command that is not known (is not in the "help" list), the program will transmit it to the listener so a difference in this case in the returned result:
LSNRCTL> show michel
NL-00853: undefined show command "michel". Try "help show"
McTns> show michel
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
TNS-12508: TNS:listener could not resolve the COMMAND given
The program have been tested against listeners version 8.1.7.4, 9.2.0.8, 10.2.0.5, 11.2.0.4, 12.1.0.2, 12.2.0.1 and 18.3.0. Any problem with other versions can be reported in this topic.
Latest version: 2018.12.11, download in lsnrctl wiki page
MD5: 251770191ae8372b88a031d2c5100869
SHA-1: 3ff81311fed307e24620336255acf6079a1f834b
[Updated on: Tue, 11 December 2018 04:09] Report message to a moderator
|
|
|
Re: McTns: a lsnrctl-like program for Windows [message #649242 is a reply to message #649195] |
Fri, 18 March 2016 12:17 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Some other differences with lsnrctl are the following ones.
First, "McTns start" does not really start a listener, it just pings it and returns you if the listener is already started or not. Note that this is also the behavior of a remote lsnrctl.
Then, McTns supports more display modes.
Let's show what lsnrctl provides:
LSNRCTL> help set displaymode
set displaymode RAW | COMPAT | NORMAL | VERBOSE: output mode for lsnrctl display
NORMAL is the standard output.
COMPAT gives an output compatible with older versions.
VERBOSE adds some information.
RAW shows the information as a parenthesized string like the description of the listener in listener.ora file.
Normal display mode
LSNRCTL> set displaymode normal
Service display mode is NORMAL
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 18-MARS -2016 17:30:23
Uptime 0 days 0 hr. 8 min. 25 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)(PORT=1531)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC112ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=nmp)(PIPENAME=\\.\pipe\michel)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myserver)(PORT=7777)))
Services Summary...
Service "MIKB2XDB.myserver" has 1 instance(s).
Instance "MIKB2", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "mik8.myserver" has 1 instance(s).
Instance "mik8", status UNKNOWN, has 1 handler(s) for this service...
Service "mik9.myserver" has 1 instance(s).
Instance "mik9", status UNKNOWN, has 1 handler(s) for this service...
Service "mika.myserver" has 1 instance(s).
Instance "mika", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb.myserver" has 1 instance(s).
Instance "mikb", status UNKNOWN, has 1 handler(s) for this service...
Service "mikb2.myserver" has 2 instance(s).
Instance "MIKB2", status READY, has 2 handler(s) for this service...
Instance "mikb2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Compatible display mode
LSNRCTL> set displaymode compat
Service display mode is COMPAT
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 18-MARS -2016 17:30:23
Uptime 0 days 0 hr. 8 min. 34 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
Services Summary...
MIKB2 has 3 service handler(s)
PLSExtProc has 1 service handler(s)
mik8 has 1 service handler(s)
mik9 has 1 service handler(s)
mika has 1 service handler(s)
mikb has 1 service handler(s)
MIKB2 has 3 service handler(s)
mikb2 has 1 service handler(s)
The command completed successfully
Raw display mode
LSNRCTL> set displaymode raw
Service display mode is RAW
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 18-MARS -2016 17:30:23
Uptime 0 days 0 hr. 8 min. 43 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
(ENDPOINT=(HANDLER=(HANDLER_MAXLOAD=0)(HANDLER_LOAD=0)(ESTABLISHED=0)(REFUSED=0)(HANDLER_ID=CBCB40F9
4F9B-4347-9E7E-0E5BAE77A068)(PRE=any)(SESSION=NS)(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)
(PORT=1531)))))
(ENDPOINT=(HANDLER=(HANDLER_MAXLOAD=0)(HANDLER_LOAD=0)(ESTABLISHED=0)(REFUSED=0)(HANDLER_ID=9470C879
C6DC-4304-9242-782E44E5DA55)(PRE=any)(SESSION=NS)(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\p
ipe\EXTPROC112ipc)))))
(ENDPOINT=(HANDLER=(HANDLER_MAXLOAD=0)(HANDLER_LOAD=0)(ESTABLISHED=0)(REFUSED=0)(HANDLER_ID=DCD942AB
867D-403F-9CC2-8D68EA134925)(PRE=any)(SESSION=NS)(DESCRIPTION=(ADDRESS=(PROTOCOL=nmp)(PIPENAME=\\.\p
ipe\michel)))))
(ENDPOINT=(HANDLER=(HANDLER_MAXLOAD=0)(HANDLER_LOAD=0)(ESTABLISHED=0)(REFUSED=0)(HANDLER_ID=63BB9F77
E721-4ED5-B4FB-DCB793C29064)(PRE=any)(SESSION=NS)(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myserver
)(PORT=7777)))))
(SERVICE=(SERVICE_NAME=MIKB2XDB.myserver)(INSTANCE=(INSTANCE_NAME=MIKB2)(NUM=3)(NUMREL=1)))
(SERVICE=(SERVICE_NAME=PLSExtProc)(INSTANCE=(INSTANCE_NAME=PLSExtProc)(NUM=1)(INSTANCE_STATUS=UNKNOW
N)(NUMREL=1)))
(SERVICE=(SERVICE_NAME=mik8.myserver)(INSTANCE=(INSTANCE_NAME=mik8)(NUM=1)(INSTANCE_STATUS=UNKNOWN)
(NUMREL=1)))
(SERVICE=(SERVICE_NAME=mik9.myserver)(INSTANCE=(INSTANCE_NAME=mik9)(NUM=1)(INSTANCE_STATUS=UNKNOWN)
(NUMREL=1)))
(SERVICE=(SERVICE_NAME=mika.myserver)(INSTANCE=(INSTANCE_NAME=mika)(NUM=1)(INSTANCE_STATUS=UNKNOWN)
(NUMREL=1)))
(SERVICE=(SERVICE_NAME=mikb.myserver)(INSTANCE=(INSTANCE_NAME=mikb)(NUM=1)(INSTANCE_STATUS=UNKNOWN)
(NUMREL=1)))
(SERVICE=(SERVICE_NAME=mikb2.myserver)(INSTANCE=(INSTANCE_NAME=MIKB2)(NUM=3)(NUMREL=2))(INSTANCE=(I
NSTANCE_NAME=mikb2)(NUM=1)(INSTANCE_STATUS=UNKNOWN)(NUMREL=1)))
The command completed successfully
Note: VERBOSE and RAW display modes are only taken into account for "status" and "services" commands.
McTns returns the same output for the same display modes but also add 2 other modes:
McTns> help show displaymode
show displaymode: shows output mode (COMPAT|NORMAL|VERBOSE|RAW|RAW+|DUMP) for McTns display
RAW+ mode displays the parenthesized string as indented one.
DUMP mode displays the dump of the IP packets received.
Also these modes are available for all commands.
With RAW+ mode the output of the "status" command becomes (click on the spoiler title below to see the result):
Output of "status" in RAW+ display modeMcTns> set displaymode raw+
Display mode is RAW+
McTns> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
STATUS of the LISTENER
----------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
Start Date 18-MARS -2016 17:30:23
Uptime 0 days 0 hr. 30 min. 25 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File E:\Oracle\Ora11204\network\admin\listener.ora
Listener Log File E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
ENDPOINT=
HANDLER=
HANDLER_MAXLOAD=0
HANDLER_LOAD=0
ESTABLISHED=0
REFUSED=0
HANDLER_ID=CBCB40F94F9B-4347-9E7E-0E5BAE77A068
PRE=any
SESSION=NS
DESCRIPTION=
ADDRESS=
PROTOCOL=tcp
HOST=myserver
PORT=1531
ENDPOINT=
HANDLER=
HANDLER_MAXLOAD=0
HANDLER_LOAD=0
ESTABLISHED=0
REFUSED=0
HANDLER_ID=9470C879C6DC-4304-9242-782E44E5DA55
PRE=any
SESSION=NS
DESCRIPTION=
ADDRESS=
PROTOCOL=ipc
PIPENAME=\\.\pipe\EXTPROC112ipc
ENDPOINT=
HANDLER=
HANDLER_MAXLOAD=0
HANDLER_LOAD=0
ESTABLISHED=0
REFUSED=0
HANDLER_ID=DCD942AB867D-403F-9CC2-8D68EA134925
PRE=any
SESSION=NS
DESCRIPTION=
ADDRESS=
PROTOCOL=nmp
PIPENAME=\\.\pipe\michel
ENDPOINT=
HANDLER=
HANDLER_MAXLOAD=0
HANDLER_LOAD=0
ESTABLISHED=0
REFUSED=0
HANDLER_ID=63BB9F77E721-4ED5-B4FB-DCB793C29064
PRE=any
SESSION=NS
DESCRIPTION=
ADDRESS=
PROTOCOL=tcps
HOST=myserver
PORT=7777
SERVICE=
SERVICE_NAME=MIKB2XDB.myserver
INSTANCE=
INSTANCE_NAME=MIKB2
NUM=3
NUMREL=1
SERVICE=
SERVICE_NAME=PLSExtProc
INSTANCE=
INSTANCE_NAME=PLSExtProc
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
SERVICE=
SERVICE_NAME=mik8.myserver
INSTANCE=
INSTANCE_NAME=mik8
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
SERVICE=
SERVICE_NAME=mik9.myserver
INSTANCE=
INSTANCE_NAME=mik9
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
SERVICE=
SERVICE_NAME=mika.myserver
INSTANCE=
INSTANCE_NAME=mika
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
SERVICE=
SERVICE_NAME=mikb.myserver
INSTANCE=
INSTANCE_NAME=mikb
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
SERVICE=
SERVICE_NAME=mikb2.myserver
INSTANCE=
INSTANCE_NAME=MIKB2
NUM=3
NUMREL=2
INSTANCE=
INSTANCE_NAME=mikb2
NUM=1
INSTANCE_STATUS=UNKNOWN
NUMREL=1
The command completed successfully
This is quite easier to read than the standard RAW mode.
RAW and RAW+ display modes are useful when you want to see information that lsnrctl does not usually display and format but might be useful in some cases. It also helps to learn some more or less documented parameters.
DUMP display mode will be useful if you want to see and learn how a listener answers to a request.
For instance, the answer to the "reload" command in Oracle 11gR2 is:
McTns> set displaymode normal
Display mode is NORMAL
McTns> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
The command completed successfully
McTns> set displaymode dump
Display mode is DUMP
McTns> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
0: 00 4d 00 00 02 00 00 00 01 3a 00 81 20 00 ff ff .M.......:.. ...
16: 01 00 00 2d 00 20 0d 0c 00 00 00 00 00 00 00 00 ...-. ..........
32: 28 44 45 53 43 52 49 50 54 49 4f 4e 3d 28 54 4d (DESCRIPTION=(TM
48: 50 3d 29 28 56 53 4e 4e 55 4d 3d 31 38 36 36 34 P=)(VSNNUM=18664
64: 37 35 35 32 29 28 45 52 52 3d 30 29 29 00 39 00 7552)(ERR=0)).9.
80: 00 06 00 00 00 00 40 28 44 45 53 43 52 49 50 54 ......@(DESCRIPT
96: 49 4f 4e 3d 28 54 4d 50 3d 29 28 56 53 4e 4e 55 ION=(TMP=)(VSNNU
112: 4d 3d 31 38 36 36 34 37 35 35 32 29 28 45 52 52 M=186647552)(ERR
128: 3d 30 29 29 2c 2c =0)),,
And the answer to the "version" command is:
Output of "version" in NORMAL and DUMP display modesMcTns> set displaymode normal
Display mode is NORMAL
McTns> version
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
TNSLSNR for 32-bit Windows: Version 11.2.0.4.0 - Production
TNS for 32-bit Windows: Version 11.2.0.4.0 - Production
The command completed successfully
McTns> set displaymode dump
Display mode is DUMP
McTns> version
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
0: 00 4d 00 00 02 00 00 00 01 3a 00 81 20 00 ff ff .M.......:.. ...
16: 01 00 00 2d 00 20 0d 0c 00 00 00 00 00 00 00 00 ...-. ..........
32: 28 44 45 53 43 52 49 50 54 49 4f 4e 3d 28 54 4d (DESCRIPTION=(TM
48: 50 3d 29 28 56 53 4e 4e 55 4d 3d 31 38 36 36 34 P=)(VSNNUM=18664
64: 37 35 35 32 29 28 45 52 52 3d 30 29 29 08 01 00 7552)(ERR=0))...
80: 00 06 00 00 00 00 00 54 4e 53 4c 53 4e 52 20 66 .......TNSLSNR f
96: 6f 72 20 33 32 2d 62 69 74 20 57 69 6e 64 6f 77 or 32-bit Window
112: 73 3a 20 56 65 72 73 69 6f 6e 20 31 31 2e 32 2e s: Version 11.2.
128: 30 2e 34 2e 30 20 2d 20 50 72 6f 64 75 63 74 69 0.4.0 - Producti
144: 6f 6e 0a 09 54 4e 53 20 66 6f 72 20 33 32 2d 62 on..TNS for 32-b
160: 69 74 20 57 69 6e 64 6f 77 73 3a 20 56 65 72 73 it Windows: Vers
176: 69 6f 6e 20 31 31 2e 32 2e 30 2e 34 2e 30 20 2d ion 11.2.0.4.0 -
192: 20 50 72 6f 64 75 63 74 69 6f 6e 0a 09 00 00 00 Production.....
208: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
224: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
256: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
272: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
288: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
304: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
336: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
352: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
368: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
384: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
416: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
432: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
448: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
464: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
496: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
512: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
528: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
544: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
576: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
592: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
608: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
624: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
656: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
672: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
688: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
704: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
736: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
752: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
768: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
784: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
816: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
832: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
848: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
864: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
880: 00 00 00 00 00 00 00 08 90 c5 03 20 04 00 00 08 ........... ....
896: 90 c5 03 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
912: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
928: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
944: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
976: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
992: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1008: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1024: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1056: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1072: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1088: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1104: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1136: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1152: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1168: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1184: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1216: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1232: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1248: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1264: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1296: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1312: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1328: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1344: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1376: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1392: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1408: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1424: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1456: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1472: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1488: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1504: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1568: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1616: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1632: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1664: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1696: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1712: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1728: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1744: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1776: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1792: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1808: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1824: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1856: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1872: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1888: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1904: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1936: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1952: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1968: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1984: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2096: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2112: 00 00 00 00 00 00 00 00 00 00 00 00 2c 2c 00 0a ............,,..
2128: 00 00 06 00 00 00 00 40 .......@
[Updated on: Fri, 12 October 2018 10:22] Report message to a moderator
|
|
|
Re: McTns: a lsnrctl-like program for Windows [message #649262 is a reply to message #649242] |
Sun, 20 March 2016 10:22 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
McTns also knows the "ping" command.
So if you create a listener.ora file (it does not matter you have or not an Oracle client) in, say, the C:\ directory, with all your listeners like:
LISTENER_ALL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1528))
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1529))
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1530))
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1531))
)
)
)
You can check all your listeners in a single command:
C:>McTns -dir C:\ ping listener_all
McTns Utility by Michel Cadot: Version 2016.03.20
Copyright (c) Michel Cadot, 2016. All rights reserved.
Used parameter file: C:\listener.ora
Found listener_all entry:
(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=((PROTOCOL=TCP))(HOST=myserver)(PORT=1528))(A
DDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1529))(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1530))
(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))))
Current Listener is listener_all
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1528)))
OK (44 msec) -- listener version 8.1.7.4.0
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1529)))
OK (34 msec) -- listener version 9.2.0.8.0
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1530)))
OK (32 msec) -- listener version 10.2.0.4.0
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
OK (32 msec)
[Updated on: Thu, 11 October 2018 12:27] Report message to a moderator
|
|
|
|
|
|
|
Re: McTns: a lsnrctl-like program for Windows [message #673984 is a reply to message #673819] |
Thu, 20 December 2018 09:25 |
_jum
Messages: 577 Registered: February 2008
|
Senior Member |
|
|
Thanks Michel for sharing these cool and useful tools!
The link to lsnrctl (and to wiki) seems to be broken today?!
MediaWiki internal error.
Original exception: [XBu0IIpKnmdbs51d-SD51wAAABY] 2018-12-20 15:24:16: Fatal exception of type "Wikimedia\Assert\ParameterAssertionException"
Exception caught inside exception handler.
Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information
[Updated on: Thu, 20 December 2018 09:25] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu Jan 23 09:25:52 CST 2025
|