Re: How to use tnsping programmatically

From: Strange Cat _at_ Work <>
Date: Wed, 8 Apr 2009 15:43:09 +0200
Message-ID: <49dcaa04$0$1121$>

> 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 Received on Wed Apr 08 2009 - 08:43:09 CDT

Original text of this message