Home » Other » Marketplace » McTnsping: a tnsping-like program for Windows (8iR1 to 12cR2)  () 1 Vote
McTnsping: a tnsping-like program for Windows [message #648221] Thu, 18 February 2016 12:02 Go to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I have posted a tnsping-like program in our tnsping wiki page.
This is a Windows stand-alone program which requires no Oracle client.
Note that this program currently accepts only tnsnames.ora or easy connect strings; ldap is currently not supported.
The help is the following one:
C:\>McTnsping -h

McTnsping Utility by Michel Cadot: Version 2017.09.17 on 17-SEPT.-2017 11:47:22

Copyright (c) Michel Cadot, 2016-2017. All rights reserved.

Usage 1: McTnsping.exe { <tns entry> | <host>:<port> } [<count>]

with
  <tns entry>    Gives the net service name in the tnsnames.ora file.
  <host>:<port>  Give the server name or IP and port (which is mandatory).
  <count>        Sets the number of times the program checks the target, default is 1.

Usage 2: McTnsping.exe
        { -h |
          { -s <host>[:<port>] | -t <tns entry> }
          [-v { 8 | 9 | 10 | 11 | 12 | 12.2 }] [-dir <tnsnames.ora directory>]
          [-tim <timeout>] [-c <count>]
        }

with
  -c <count>             Sets the number of times the program checks the target,
                           default is 1.
  -dir <directory>       Gives the directory for sqlnet.ora and tnsnames.ora files;
                           this option is ignored if "-s" option is given.
  -h                     Displays the version and the usage help.
  -s <host>[:<port>]     Gives the server name or IP and port to check the listener,
                           default port is 1521.
  -t <tns entry>         Gives the net service name in the tnsnames.ora file.
  -tim <timeout>         Gives the timeout (in seconds) on connection to listener,
                           default is 5 seconds.
  -v {8|9|10|11|12|12.2} Selects the version of the simulated tnsping, default is 11.

"-s" and "-t" options are exclusive.
If "-t" is choosen, the program searches for sqlnet.ora and tnsnames.ora files:
* if "-dir" option is given, in this directory.
* otherwise, first in TNS_ADMIN directory if set, then in ORACLE_HOME/network/admin.
Note: PORT must be after HOST in the tnsnames 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/200058/

Here's an example of its usage compared to the same tnsping output (I have cut the end of entry description lines):
C:\>tnsping mikb 3

TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 18-FÉVR.-2016 19:57:44

Copyright (c) 1997,  2007, Oracle.  All rights reserved.

Used parameter files:
E:\oracle\ora102\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ...
OK (30 msec)
OK (30 msec)
OK (50 msec)

C:\>McTnsping mikb 3

McTnsping Utility by Michel Cadot: Version 2016.02.21 on 21-FÉVR.-2016 21:23:04

Copyright (c) Michel Cadot, 2016. All rights reserved.

Used parameter files:
E:\oracle\ora102\network\admin\sqlnet.ora
E:\oracle\ora102\network\admin\tnsnames.ora

Found tnsnames.ora entry:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=...

Attempting to contact myserver:1530
OK (41 msec) -- listener version 10.2.0.4.0
OK (21 msec) -- listener version 10.2.0.4.0
OK (21 msec) -- listener version 10.2.0.4.0
Note: a small difference with tnsping is that if the tnsnames entry contains several ADDRESS parts, McTnsping reports the result of all addresses and not only the first one which works.

Latest version: 2017.09.17, download in tnsping wiki page
MD5:   527031b55fbbc8935b26b6effb5a1194
SHA-1: 8ef6c42021ac41495d8db2dd424260f3c3e9e7e3

[Updated on: Tue, 24 October 2017 04:22]

Report message to a moderator

Re: McTnsping: a tnsping-like program for Windows [message #661893 is a reply to message #648221] Wed, 05 April 2017 07:54 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

New version with full 12cR1 support.

[Updated on: Wed, 05 April 2017 09:09]

Report message to a moderator

Re: McTnsping: a tnsping-like program for Windows [message #663798 is a reply to message #661893] Tue, 20 June 2017 10:10 Go to previous messageGo to next message
jeng1111
Messages: 1
Registered: June 2017
Junior Member
Great utility! Thanks for sharing. It does not resolve host names for me, I need to use it with IP addresses, but still a wonderful standalone for Oracle listener troubleshooting!
Re: McTnsping: a tnsping-like program for Windows [message #663799 is a reply to message #663798] Tue, 20 June 2017 11:43 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Have you any error with host names?
Are the following displayed lines:
- "Found tnsnames.ora entry" (if you used a tnsnames.ora entry)
- "Attempting to connect..."
show the correct connect information?
Can you ping the host name from where you executed McTnsping?

If you share your error, I will (may) be able to fix it for everyone.

Re: McTnsping: a tnsping-like program for Windows [message #663873 is a reply to message #663799] Thu, 22 June 2017 06:38 Go to previous messageGo to next message
_jum
Messages: 522
Registered: February 2008
Senior Member
Load and tested the program, but with no success, got no output:

C:\>McTnsping -h
C:\>

Michel, what am I doing wrong?

PS:
MD5 checksum of McTnsping.exe, the only fiel in McTnsping.zip is
afea32c6270a4b2e1537d61a783aa433


[Updated on: Thu, 22 June 2017 06:38]

Report message to a moderator

Re: McTnsping: a tnsping-like program for Windows [message #663877 is a reply to message #663873] Thu, 22 June 2017 07:30 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

MD5 is correct (I will add it to the top message).
The program uses your TEMP directory, is it set?
The program is self-sufficient, try to execute it clearing PATH, *LIB environment variables.
Which Windows version have you?

Re: McTnsping: a tnsping-like program for Windows [message #663878 is a reply to message #663877] Thu, 22 June 2017 10:34 Go to previous messageGo to next message
_jum
Messages: 522
Registered: February 2008
Senior Member
TEMP was set. After clearing PATH it runs fine Smile

Will test it in the next days.
Thanks for sharing!!
Re: McTnsping: a tnsping-like program for Windows [message #663879 is a reply to message #663878] Thu, 22 June 2017 10:42 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

TEMP can be set but it must be set to a directory on which you have full accesses.

Re: McTnsping: a tnsping-like program for Windows [message #665715 is a reply to message #663879] Sun, 17 September 2017 05:08 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

New version with full 12cR2 support.

Re: McTnsping: a tnsping-like program for Windows [message #665755 is a reply to message #665715] Wed, 20 September 2017 01:03 Go to previous message
Frank Naude
Messages: 4531
Registered: April 1998
Senior Member
I assume one will be able to use Michel's program to quickly test if a firewall is allowing/blocking traffic between a client and a database server.
Previous Topic: Find and Recompile Invalid Objects Functionality in dbForge Studio for Oracle v3.8
Next Topic: McTns: a lsnrctl-like program for Windows
Goto Forum:
  


Current Time: Wed Nov 22 21:48:19 CST 2017

Total time taken to generate the page: 0.02834 seconds