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 tell if Oracle is ready?

Re: How to tell if Oracle is ready?

From: Scott Mattes <smattes_at_erols.com>
Date: 1997/02/03
Message-ID: <5d4pdq$8vi@boursy.news.erols.com>#1/1

My thank yous to those who gave suggestions. After testing on my system I have decided that a combination of

 ps -eaf | grep ora_d001_$ORACLE_SID | grep -v grep > /dev/null

and when grep returns 0 I follow up with

 # * From: jstrange_at_imtn.dsccc.com (John Strange)

 # * Newsgroups: comp.databases.oracle.server  #


          

 sqlplus <<'EOF' > /dev/null
 /
 set pause off
 set pause off
 set pause off
 set pause off
 set pause off

 set pause off              
 exit 5                     
 EOF          
              
 if [ $? != 5 ]  
 then            
      ....

 fi

successfully determines if Oracle is up AND ready to work.

And on top of that I learned what a 'here document' is (quite neat, actually).

smattes_at_erols.com (Scott Mattes) wrote:

>On the computer we run our app on, Oracle is down for a certain time
>each night. The only thing is that we can not be sure exactly when
>this will be (once a human policy is 'set in concrete' people tend to
>forget that it is subject to change). We also have jobs that get
>scheduled to run over night and I need to be sure that they don't run
>until Oracle is up and ready. I also need to get them run as soon as
>possible so that the users have their output waiting for them in the
>morning.
 

>I have tried to use 'ps -eaf | grep x_$ORACLE_SID', where x has been
>'dbwr', 'smon' or 'd001' to no avail. If I schedule a job to start
>even 3 seconds after the last dameon is up (d001 seems to be the last
>one up) I get an error saying Oracle shutdown/initialization is in
>progress and can not connect.
 

>What should I be keying on to determine that the instance is ready to
>work?
 

>Thank you.
>------------
>Scott Mattes
>smattes_at_erols.com
 

>"Our laws and our institutions must necessarily be based upon and embody the
> teachings of the Redeemer of mankind. It is impossible that it should be otherwise; and
> in this sense and to this extent our civilization and our institutions are emphatically
> Christian." - United States Supreme Court, 1892.
 

>Don't support forced abortions -- boycott 'made in China'!
 

>Check out the U. S. Taxpayers' Party at www.ustaxpayers.org
 

>Watch your government employees at http://www.vote-smart.org



Scott Mattes
smattes_at_erols.com

"Our laws and our institutions must necessarily be based upon and embody the  teachings of the Redeemer of mankind. It is impossible that it should be otherwise; and  in this sense and to this extent our civilization and our institutions are emphatically  Christian." - United States Supreme Court, 1892.

Don't support forced abortions -- boycott 'made in China'!

Check out the U. S. Taxpayers' Party at www.ustaxpayers.org

Watch your government employees at http://www.vote-smart.org Received on Mon Feb 03 1997 - 00:00:00 CST

Original text of this message

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