Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check Database is running / not

 
SonalPSPL Bagmar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
i want to check through java code whether my oracle database on the server machine (solaris platform) is up and running.
How can i do that? any hints / ideas....


Regards
SONAL
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
send a 'select sysdate from dual' and check the response.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to know if the database as a whole is running or a particular instance?

Either way, you would do a query. But the specific query would vary. Also note that you are checking the query doesn't throw an exception. Not a specific return value.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic