Re: How to use tnsping programmatically

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 8 Apr 2009 17:02:07 +0200
Message-ID: <49dcbc6e$0$32004$426a74cc_at_news.free.fr>


"Strange Cat _at_ Work" <dummy_at_dummy.com> a écrit dans le message de news: 49dcaa04$0$1121$4fafbaef_at_reader1.news.tin.it...
|> You can call tnsping from a shell script or a program, but how often
| > are you planning on running this check?
| > How often were you running your last check that managment or the
| > network team asked you not to run?
| > There is generally no real need to continuously check to see if the
| > database is there. If the database is not there you will know in
| > fairly short order when the phone calls start coming in. From within
| > an application you can just check the return code on the connect
| > call. If the connect fails you will get an error code and you can
| > pass this on to an alert system (feature) to provide the database down/
| > unreachable error information.
|
| Thanx for answering Mark,
|
| the need is to avoid attempting the connection if the Oracle instance
| appears to be unreachable. We're developing a panel pc app that has to
| connect to an Oracle server on demand (user touching screen and booking for
| canteen).
|
| Problem is that the Oracle server happens to be on the other side of the
| mountains (and this is for real, no joke) and we've been warned about lack
| of connectivity/bandwidth on this connection.
|
| So, to make a long story short, what i'm trying to do is avoid connection
| (and users waiting for a timeout to occur in front of pc) if Oracle is not
| tnspingable...
|
| Other ideas are welcome, of course :)
|
| > HTH -- Mark D Powell --
|
| Thanx again
| Paolo
|

Being tnspingable does not mean instance is reachable, just listener is. Why not just try to connect ?

Regards
Michel Received on Wed Apr 08 2009 - 10:02:07 CDT

Original text of this message