This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,592 Users
  • 2,269,776 Discussions
  • 7,916,825 Comments

Discussions

tnsping returns -1ms for everything

BrianDwyer
BrianDwyer Member Posts: 23
edited May 13, 2016 5:32PM in SQLcl

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

Craig Elliott

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Master Product Manager NC, USAPosts: 8,927 Employee
    edited May 5, 2016 9:41AM

    Thanks, I can reproduce this behavior and will log a bug. Thanks so much for the feedback Brian.

  • Barry Mcgillin-Oracle
    Barry Mcgillin-Oracle Development Director Member Posts: 1,537 Employee
    edited May 13, 2016 5:32PM

    all fixed now

    SQL> show tns

    TNS Lookup locations

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

    1.  USER Home dir

        /Users/bamcgill

    Location used:

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

      /Users/bamcgill

    Available TNS Entries

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

    LOCAL_GBR30060

    LOCAL

    oracle

    OUG

    tns

    SQL> tnsping LOCAL_GBR30060

    ping:1054ms

    SQL> tnsping LOCAL_GBR30060

    ping:4054ms

    SQL>

    Craig Elliott