ORIGINAL POST:
Hello all!
We have a SUN SPARC running Solaris 2.5.1 and Oracle 7.3.3.
I was wondering if anyone has the startup and shutdown scripts for V 7.3.3
of ORACLE Database?? I was trying to modify the default scripts under
ORACLE_HOME/bin, but, no success yet.
TIA
Harry
THANKS TO ALL THE REPONDENTS:
SCRIPTS ARE ATTACHED:
#/bin/sh
#
#
#
###################################
#
# usage: dbstart
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################
ORATAB=/var/opt/oracle/oratab
LD_LIBRARY_PATH="/opt/SUNWspro/lib:/opt/lib:/usr/lib:/usr/openwin/lib:/opt/
dt/lib"
export LD_LIBRARY_PATH
#
# Loop for every entry in oratab file and and try to start
# that ORACLE
#
cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;; #comment-line in oratab
*)
# Proceed only if third field is 'Y'.
if [ "`echo $LINE | awk -F: '{print $3}' -`" = "Y" ] ; then
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
if [ "$ORACLE_SID" = '*' ] ; then
ORACLE_SID=""
fi
# Called programs use same database ID
export ORACLE_SID
ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
# Called scripts use same home directory
export ORACLE_HOME
# Put $ORACLE_HOME/bin into PATH and export.
PATH=$PATH:$ORACLE_HOME/bin ; export PATH
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
if [ -f $ORACLE_HOST/dbs/sgadef${ORACLE_SID}.dbf ] ||
[ -f $ORACLE_HOST/dbs/sgadef${ORACLE_SID}.ora ]
then
STATUS=-1
else
STATUS=1
fi
case "$STATUS" in
1)
if [ -f $PFILE ]; then
svrmgrl >/dev/null 2>&1 <<EOF
connect internal
startup
EOF
if test $? -eq 0 ; then
echo ""
echo "Database \"${ORACLE_SID}\" warm started."
else
echo ""
echo "Database \"${ORACLE_SID}\" NOT started."
fi
else
echo ""
echo "Can't find init file for Database
\"${ORACLE_SID}\"."
echo "Database \"${ORACLE_SID}\" NOT started."
fi
;;
-1)
echo ""
echo "Database \"${ORACLE_SID}\" possibly left running when
system went down (system crash?)."
echo "Notify Database Administrator."
svrmgrl >/dev/null 2>&1 <<EOF
connect internal
shutdown abort
EOF
if test $? -eq 0 ; then
if [ -f $PFILE ] ; then
svrmgrl >/dev/null 2>&1 <<EOF
connect internal
startup
EOF
if test $? -eq 0 ; then
echo ""
echo "Database \"${ORACLE_SID}\" warm started."
else
echo ""
echo "Database \"${ORACLE_SID}\" NOT started."
fi
else
echo ""
echo "Can't find init file for Database
\"${ORACLE_SID}\"."
echo "Database \"${ORACLE_SID}\" NOT started."
fi
else
echo "Database \"${ORACLE_SID}\" NOT started."
fi
;;
esac
fi
;;
esac
done
#!/bin/sh
#
#
###################################
#
# usage: dbshut
#
# This script is used to shutdown ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################
ORATAB=/var/opt/oracle/oratab
LD_LIBRARY_PATH="/opt/SUNWspro/lib:/opt/lib:/usr/lib:/usr/openwin/lib:/opt/
dt/lib"
export LD_LIBRARY_PATH
#
# Loop for every entry in oratab file and and try to start
# that ORACLE
#
cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;; #comment-line in oratab
*)
# Proceed only if third field is 'Y'.
if [ "`echo $LINE | awk -F: '{print $3}' -`" = "Y" ] ; then
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
if [ "$ORACLE_SID" = '*' ] ; then
ORACLE_SID=""
fi
# Called programs use same database ID
export ORACLE_SID
ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
# Called scripts use same home directory
export ORACLE_HOME
# Put $ORACLE_HOME/bin into PATH and export.
PATH=$PATH:$ORACLE_HOME/bin ; export PATH
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
svrmgrl >/dev/null 2>&1 <<EOF
connect internal
shutdown normal
EOF
if test $? -eq 0 ; then
echo "Database \"${ORACLE_SID}\" shut down."
else
echo "Database \"${ORACLE_SID}\" not shut down."
fi
fi
;;
esac
done
#!/sbin/sh
#
# /etc/init.d/oracle - Start/Stop Oracle databases
#
#
#
PATH=/usr/bin:/opt/oracle/bin
case $1 in
'start')
su oracle -c /opt/oracle/bin/dbstart
;;
'stop')
su oracle -c /opt/oracle/bin/dbshut
;;
*)
echo "usage: /etc/init.d/oracle {start|stop}"
;;
esac
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:36 CDT