:
#
# $Header: dbsup.sh@@/main/osit_unix_7.3.1/1 \
# Checked in on Sat Aug 19 14:49:08 US/Pacific 1995 by wyim \
# Copyright (c) 1995 by Oracle Corporation \
# $ Copyr (c) 1992 Oracle
#
#
# dbsup:  Returns the number of running DB instances associated 
#	  with ORACLE_HOME.  
#         A return value of 0 means there's NO running DBs.
#
# Expected to be called from ORCA scripts and assume ORACLE_HOME is already set.
#

#
# If the dbs/ directory doesn't even exist, then no sgadef*.dbf and therefore
# no running instances.
#
if [ ! -d $ORACLE_HOME/dbs ]
then
    exit 0;
fi 
cd $ORACLE_HOME/dbs
nr_sga=`find . -name "sgadef*.dbf" -print | wc -l`

exit $nr_sga;
