Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check whether DB is up
A copy of this was sent to pradeepj_at_delhi.tcs.co.in
(if that email address didn't require changing)
On Sat, 21 Nov 1998 09:58:59 GMT, you wrote:
>Hi! In my application which I am writing in 'C' and pro*C, I want to
>continuously check whether an instance of oracle database is up or not. This
>I can do by connecting to the database(using EXEC SQL CONNECT)after certain
>fixed interval of time but this seems to me very time consuming method.
>
>is there any other way like what tns ping would be doing internally.
>
tnsping only checks for the existence of the sqlnet listener -- no database need be running for tnsping to succeed.
If you connect to the database once in your application and stay connected, an occasional "select sysdate from dual" will do it for you -- if it works, database is up, if not -- database is not up.
>I do not want to use tnsping in my program as it is shell command.
>
>thanks in advance
>
>-pradeep
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Nov 21 1998 - 08:09:49 CST