Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: TnsPing

Re: TnsPing

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 18 Dec 1998 08:19:27 +0200
Message-ID: <75cs78$334$1@hermes.is.co.za>


<cross posting newsgroups removed>
Kazimir R. wrote in message <7533c1$r0s$1_at_ns.felk.cvut.cz>...
>Please, does anybody how to programatically make tnsping from C++? (I mean
>functionality of standalone exe program tnsping80.exe).

Why? If the answer is to enable a client app to determine if the database and listener are available, then you can simply open a standard client socket on port 1521 (or whatever port the listener is running on) and see if you get an accept() from the server. If you do, then the listener is working. If not - well there can be a many things that are wrong. What do you next? What do you test to make sure that the app can work? Do you 1st test to make sure all the SQL*Net DLLs are there? Do you test for the TCP/IP protocol stack being installed? Do you test to see if the network adapter is working? Do you test the network? Do you test the server Oracle is running on to make sure it's up and running? (a simply ICMP echo will not tell you that either).

Where do you draw the line? IMO an application can not test for every single thing that can cause it to crash or not to work. If you have to, well, then check the operating system and if it's Win95/98, refuse to run! :-)

If you want to try something else.. - well I'm not so sure. Tnsping is a very simple tool. Beyond telling you that a listener works or does not work, it's not of much use. It does not tell you if the database is available. Or provide any other useful data (I don't even think that the response time of Tnsping is of much real use to anyone).

regards,
Billy Received on Fri Dec 18 1998 - 00:19:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US