Tags: agent, beacuse, connection, database, dies, fail, mysql, oracle, overs, prompt, running, server, solaris, sql

How to check that the database is up and running from solaris prompt

On Database » Oracle

1,405 words with 6 Comments; publish: Tue, 12 Feb 2008 06:15:00 GMT; (25058.59, « »)

I have an agent that fail overs to other server but it dies beacuse it does not get the connection from the database as the database is in the process of startup. Is there any way i can check the status of the database that it is up and running from solaris prompt.

The database that i am using is 9.2 and solarirs 9.

Thanks

All Comments

Leave a comment...

  • 6 Comments
    • Why do not check if pmon process exists (and/or smon...) ?

      Nicolas.

      #1; Fri, 22 Feb 2008 23:19:00 GMT
    • I have checked the procesess (smon and pmon ) they start even the database is in nomount mode...
      #2; Fri, 22 Feb 2008 23:20:00 GMT
    • In this case, you can connect and query v$instance table :

      E:\Documents and Settings\GASPAROTTO>set ORACLE_HOME=e:\oracle\ora92

      E:\Documents and Settings\GASPAROTTO>set ORACLE_SID=DEMO9I

      E:\Documents and Settings\GASPAROTTO>%ORACLE_HOME%\bin\sqlplus /nolog

      SQL*Plus: Release 9.2.0.7.0 - Production on Fri Sep 9 20:37:50 2005

      Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

      SQL> conn / as sysdba

      Connected.

      SQL> select status from v$instance;

      STATUS

      --

      OPEN

      SQL>

      You can make make a script which catch the result.

      Nicolas.

      #3; Fri, 22 Feb 2008 23:21:00 GMT
    • Thanks Jens,

      I am a little ridiculous with my previous post ;-).

      Nicolas.

      #5; Fri, 22 Feb 2008 23:23:00 GMT
    • Thanks guys its workin
      #6; Fri, 22 Feb 2008 23:24:00 GMT