Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

tnsping returns -1ms for everything

BrianDwyerMay 5 2016 — edited May 13 2016

Hello, testing the tnsping function and have an issue that everything returns -1ms

SYSTEM @ oracon1 >show tns

TNS Lookup locations

--------------------

1.  USER Home dir

    C:\Users\Brian Dwyer

2.  TNS_ADMIN

    D:\Oracle_Sqlci\tnsnames

Location used:

-------------

        D:\Oracle_Sqlci\tnsnames

Available TNS Entries

---------------------

MADEUP

ORACON1

PDBCON1

PDBCON2

All TNS Entires are valid except MADEUP which is

MADEUP =

(DESCRIPTION =

   (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = TCP)(HOST = unknown)(PORT = 1599))

   )

(CONNECT_DATA =

   (SERVICE_NAME = MADEUP)

)

)

SYSTEM @ oracon1 >tnsping oracon1

ping:-1ms

SYSTEM @ oracon1 >tnsping pdbcon1

ping:-1ms

SYSTEM @ oracon1 >tnsping madeup

ping:-1ms

SYSTEM @ oracon1 >tnsping blah:666/blah

ping:-1ms

SYSTEM @ oracon1 >

## UPDATE ADDED SINCE POST

I can get it to work by specifiying a valid connection like this

SYSTEM @ oracon1 >tnsping 192.168.1.80:1521/oracon1

ping:16ms

and i can get a failure message if i use a valid ip address but just give it a duff database name

SYSTEM @ oracon1 >tnsping 192.168.1.80:1521/orac

ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

ping:-1ms

Just doesn't work on tnsnames.

cheers

Brian

Message was edited by: BrianDwyer to add an update

Comments
Post Details
Added on May 5 2016
2 comments
873 views