Xref: alice comp.databases.oracle.server:83115
Path: alice!news-feed.fnsi.net!newsfeed.direct.ca!logbridge.uoregon.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
From: Anil Kumar <aneela1975@my-deja.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: SGADEF no longer supported in Oracle 8.1.5 .. need to find how to detect a db is open from a script !
Date: Wed, 02 Feb 2000 20:30:23 GMT
Organization: Deja.com - Before you buy.
Lines: 55
Message-ID: <87a450$vsh$1@nnrp1.deja.com>
References: <879452$a2b$1@kermit.esat.net>
X-Article-Creation-Date: Wed Feb 02 20:30:23 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
X-Http-Proxy: 1.0 x30.deja.com:80 (Squid/1.1.22) for client 204.151.97.178
X-MyDeja-Info: XMYDJUIDaneela1975

you can do something like
count=`ps -ef |grep _<SID> |wc -l`
This will give the count of background processes.
So if the count is less than 7 (?) then we can say that the instance
did not startup.

Regards
Anil

In article <879452$a2b$1@kermit.esat.net>,
  "Dominic Cribbin" <dominic.cribbin@cognotecSTOPSPAM.com> wrote:
> Hi,
>
> I am currently migrating a script that we used to take cold backups
of an
> Oracle DB on a Unix Sun Solaris machine. We are currently using
Oracle8i
> 8.1.5, my problem is that "sgadef" is no longer supported in the
version of
> Oracle. Can anyone advise my on what the equivalent or similar
variable is
> in Oracle 8.1.5 .... or what setting tells the script that the
database is
> currently open.
>
> Any advice would be great. Thanks.
>
> D.
>
> P.S - a sample of the code we used is as follows:
>
> #
> # Now check that the database is actualy up and running
> #
> if [ !  -f $ORACLE_HOME/dbs/sgadef$ORACLE_SID.dbf ]
>         then
>         echo "Oracle instance "$ORACLE_SID" did not appear to start"
> >>$LOGFILES/coldbackup.log
> #
> # SNMP ALERT for failure of database retstart
> #
> /usr/sbin/snmp_trapsend -h $HOST -c $COMMUNITY -e $ENTERPRISE -s
$TRAP -a
> "$OBJECT STRING (DATABASE RESTART FAILED)"
> #
> # End SNMP alert
> #
>  exit
> fi
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
