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: Allen Kirby <akirby_at_att.com>
Date: 1997/01/30
Message-ID: <32F0A983.485@att.com>#1/1

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?
>

Scott,

	On the Oracle Unix installations I've seen there is a file
	in $ORACLE_HOME/dbs named 'sgadef<SID>.dbf.  This file is
	created when the database is opened (or mounted, not exactly
	sure but you can try it and see) and removed when the database
	is closed.  You should be able to check for the existence of
	this file.  As I said, there may be a gray area if the database
	is mounted but not open but in most cases that is only a few
	seconds anyway.  I think it's cleaner than using ps or
	attempting to connect, although attempting to connect is the
	ultimate test.  The other way might be to look for Oracle
	shared memory segment(s) with the ipcs command.
-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Thu Jan 30 1997 - 00:00:00 CST

Original text of this message

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