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: easy ways to know oracle is up

Re: easy ways to know oracle is up

From: Jomon P Jacob <jacob.jomon_at_gmail.com>
Date: 24 Apr 2007 05:46:54 -0700
Message-ID: <1177418814.563238.204860@b40g2000prd.googlegroups.com>

You can use the following commans in unix :

 PROCS='ps -ef | grep <DB_SID> | wc -l`

  if [ ${PROCS} -ge 4 ]
  then

     echo " Database is up and running"
  else
    DBRUN="Database is down"
  fi

Or even You can use the following command to check whether any of the mandaatory process is running :

   % ps -ef | grep pmon

 This will list you the whether the pmon process for the particular DB is up and runing

     eg :
        pmon_mydb

In windows you may
           1 ) Set the ORACLE_SID
           2 ) Start the SQLPLUS as " sqlplus "/ as sysdba"  <===
provided you have rights ( or use sys/passwd)
           3)   It dispaly " connnected to an idle instance" if the db
is down

    or else Query :

          SQL> select status from v$database;

Thanks
Jomon jcob Received on Tue Apr 24 2007 - 07:46:54 CDT

Original text of this message

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