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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to check whether DB is up

Re: How to check whether DB is up

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 21 Nov 1998 14:09:49 GMT
Message-ID: <3658c8b9.5626159@192.86.155.100>


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  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

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

Original text of this message

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