I originally asked: "Does anybody have Oracle ASE failover scripts they're
willing to share? "
Thanks go out to:
Bruce Hines [ bruce.hines_at_eds.com <mailto:bruce.hines_at_eds.com> ] (who
responded in minutes!),
Zhiping Hu [Zhiping.Hu_at_compaq.com] and
Bill Kirk[Bill.Kirk_at_COMPAQ.com]
Bill wrote:
Check out the /var/ase /examples_unsupported/ directory it has an example
for Oracle for TruCluster 1.6.
Zhiping sent the two attached files.
Bruce's scripts are:
ASE start script:
_at_startText omzlspa1_start_script
#
# A skeleton example of a start action script.
#
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
ASETMPDIR=/var/ase/tmp
if [ $# -gt 0 ]; then
svcName=$1 # Service name to start
else
svcName=
fi
#
# Any non zero exit will be considered a failure.
#
nohup /usr/local/ase/omzlspa1-start &
exit 0
_at_endText omzlspa1_start_script
We start TNS Listener, Oracle Database, Oracle Web Server and application
stuff external to the ASE start script and return to indicate service was
successfully started.
cat /usr/local/ase/omzlspa1-start
#
# Start action script for starting the following:
#
# Oracle Listener
# Oracle Database
# Oracle Web Server
#
# when the ASE server OMZLSPA1 is started.
#
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
/usr/local/ase/ipcdel oracle <====we clean up shared memory and
semaphores
/usr/local/ase/tns_listener start
/usr/local/ase/ORACLE start <====this is the Oracle start up
/usr/local/ase/ows-first
/usr/local/ase/oracle_web_server start
/usr/local/ase/crontabs start
/sbin/init.d/syslog stop
/sbin/init.d/syslog start
/usr/local/ase/sql-backtrack
#
# Any non zero exit will be considered a failure.
#
exit 0
cat /usr/local/ase/ORACLE
#!/bin/ksh
#
# Start/Stop script for the ORACLE LSPPR DB instance and TNS Listener
#
# Created 03-16-2000 JT
BINDIR=/db/oracle
ORACLEUSER=oracle
case "$1" in start_msg|stop_msg)
if [ "$1" = start_msg ]; then
verb=Start
else
verb=Stopping
fi
echo "$verb ORACLE database"
;;
start)
if [ -x "$BINDIR/LSPPR_dbstart" ]; then
su - "$ORACLEUSER" -c "$BINDIR/LSPPR_dbstart"
else
echo "$BINDIR/LSPPR_dbstart not found"
fi
;;
stop)
if [ -x "$BINDIR/LSPPR_dbshut" ]; then
su - "$ORACLEUSER" -c "$BINDIR/LSPPR_dbshut"
else
echo "$BINDIR/LSPPR_dbshut"
fi
;;
*)
echo "Unknown flag passed to $0"
echo "Usage: $0 {start, stop}"
;;
esac
cat /db/oracle/LSPPR_dbstart
#!/bin/ksh
#
# This script will start up LSPPR oracle instance
#
#
#
# Set up the environment
. ~oracle/.profile
#
#
# Check if the instance is already up and running
STAT=`ps -fu oracle | grep LSPPR | grep ora_ | grep -v grep `
if [ $? = 0 ]; then
echo " "
echo " ERROR: Oracle instance $ORACLE_SID is already running."
echo " Shutdown the instance $ORACLE_SID first then restart."
exit
fi
#
#
# Start up the instance
svrmgrl <<EOF
connect internal
startup
EOF
exit
cat /db/oracle/LSPPR_dbshut
#!/bin/ksh
#
# This script will shutdown LSPPR oracle instance
#
#
# Set up the environment
. ~oracle/.profile
#
# Shutdown LSPPR Instance
svrmgrl <<EOF
connect internal
shutdown immediate
EOF
exit
Received on Fri Jul 13 2001 - 16:46:46 NZST