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 Go to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
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 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
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 mode
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 modes

[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 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
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 #661894 is a reply to message #649262] Wed, 05 April 2017 09:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

New version with full support of 12cR1.

Re: McTns: a lsnrctl-like program for Windows [message #665996 is a reply to message #661894] Fri, 06 October 2017 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

New version with full support of 12cR2.

Re: McTns: a lsnrctl-like program for Windows [message #666258 is a reply to message #665996] Tue, 24 October 2017 04:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Full(?) support of 12.2 "servacls" undocumented command.

[Updated on: Tue, 24 October 2017 12:21]

Report message to a moderator

Re: McTns: a lsnrctl-like program for Windows [message #673819 is a reply to message #666258] Tue, 11 December 2018 04:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
New version with the following:
  • Support of 18c (with new error messages and new "remote_registration_address" parameter for SCAN listener)
  • Implementation of "spawn" command which is (slightly) documented but not implemented in lsnrctl
  • Improvement in "show all" command (which is not known in lsnrctl)
  • You can now just use "X" for "show X" (see example below)
  • Fix an important bug: sometimes the listener reports "successful" in first packet of its answer then an error in subsequent ones, this is now supported (previously McTns wrongly returned the command was successful)
If you want see the value of parameter X you can now just type "X" instead of "show X":
McTns> current_listener
Current Listener is LISTENER
McTns> log_file
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
myserver:1531 parameter "log_file" set to E:\Oracle\diag\tnslsnr\myserver\listener\alert\log.xml
The command completed successfully
McTns> oracle_home
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1531)))
ORACLE_HOME="E:\Oracle\Ora11204"
The command completed successfully
This is true for all parameters and will be unless the parameter name is also a listener command.

Re: McTns: a lsnrctl-like program for Windows [message #673984 is a reply to message #673819] Thu, 20 December 2018 09:25 Go to previous messageGo to next message
_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

Re: McTns: a lsnrctl-like program for Windows [message #673986 is a reply to message #673984] Thu, 20 December 2018 10:09 Go to previous message
Michel Cadot
Messages: 68617
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

It currently works from my place maybe a transient error, please try it again.

Previous Topic: Oracle SQL Performance Tuning and Optimization: Scripts
Next Topic: PL/SQL parallel execution tool
Goto Forum:
  


Current Time: Tue Mar 19 00:22:39 CDT 2024