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: "sgadef" is no longer supported ... anyone know of a similiar method ..

Re: "sgadef" is no longer supported ... anyone know of a similiar method ..

From: Alex Hudghton <alex_at_alenda.NOSPAM!.freeserve.co.uk>
Date: Wed, 02 Feb 2000 11:34:47 GMT
Message-ID: <389810b8.8643218@news.freeserve.net>


How about

 ps -ef | grep pmon_<SID> | grep -v grep > /dev/null if [ $? -eq 0 ]
then
<database open>
else
<database closed>
fi

?

Alex

On Mon, 31 Jan 2000 14:29:56 -0000, "Dominic Cribbin" <dominic.cribbin_at_cognotecSTOPSPAM.com> wrote:

>Hi,
>
>I am trying migrate an exist Unix script that performs an automated backup
>to tape. Part of this script is that it must check to see if the database is
>current open. We are migrating to Oracle8i 8.1.5 were I am getting an error
>with the "sgadef" parameter in the code below ... it is no longer supported.
>
>Can any one advise me on another method (similiar to the sgadef method) that
>I could use to check for the database status is open for a script like the
>one below. I would be gratefully for any advice.
>
>
>
>if [ -f $ORACLE_HOME/dbs/sgadef$ORACLE_SID.dbf ]
> then
> echo "Oracle instance "$ORACLE_SID" is running closing it to perform
>coldbackup" >>$LOGFILES/coldbackup.log
>
>
Received on Wed Feb 02 2000 - 05:34:47 CST

Original text of this message

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