How to check database status

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pkm377
    New Member
    • May 2010
    • 2

    #1

    How to check database status

    Before connecting to Oracle Database using c#, how can we check wheather the database is up and running?
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    If you know the ip/port where the db is running. You can try to connect to it. If it fails you can catch an exception.

    Regards
    Dheeraj Joshi

    Comment

    • Curtis Rutland
      Recognized Expert Specialist
      • Apr 2008
      • 3264

      #3
      I would suggest wrapping your open and query statements in a try/catch expression. Based on the exception, you will know the status.

      Comment

      Working...