Re: Is Oracle Running?
From: Lynn Osburn <losburn_at_teal.csn.org>
Date: Fri, 20 May 1994 18:31:42 GMT
Message-ID: <Cq464u.HIH_at_csn.org>
Date: Fri, 20 May 1994 18:31:42 GMT
Message-ID: <Cq464u.HIH_at_csn.org>
>Is there a way to determine within a Cshell if Oracle is running?
>Currently we count the processes that begin with 'ora_' but I believe
>there has to be a better way. Thanks.
Sure, check for the existance of $ORACLE_HOME/dbs/sgadefSID.dbf where SID is the SID for the instance in question. The file is created when the instance is started, and it goes away when you shutdown the database.
In ksh, something like if [[ -f $ORACLE_HOME/dbs/sgadeftest.dbf ]]
then your_logic_here
hope that helps,
-- Lynn Osburn losburn_at_pace.com REAL men don't use porn.Received on Fri May 20 1994 - 20:31:42 CEST