| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: "sgadef" is no longer supported ... anyone know of a similiar method ..
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
![]() |
![]() |