To the Brass 
Cannon Webboard
Established 1986

Kevin Martin - PO Box 82783 - Portland, OR 97282

Oracle startup and shutdown

Important!

Installation instructions appear below each script!



#!/sbin/sh
# Start/stop Oracle database(s) found in /var/opt/oracle/oratab
# NOTE that tns listener must start AFTER this script (S98tns start)
# and stop BEFORE (K20tns stop) this script.

case "$1" in
'start')
	su oracle -c "/oracle/app/oracle/product/8.1.6/bin/dbstart"
	;;
'stop')
	su oracle -c "/oracle/app/oracle/product/8.1.6/bin/dbshut"
	;;
*)
	echo "Usage: $0 { start | stop }"
	exit 1
	;;
esac
exit 0

Install this script as /etc/init.d/oracle then symlink it:

# link -s /etc/init.d/oracle /etc/rc2.d/S97oracle
# link -s /etc/init.d/oracle /etc/rc1.d/K21oracle
# link -s /etc/init.d/oracle /etc/rc0.d/K21oracle
# link -s /etc/init.d/oracle /etc/rcS.d/K21oracle




#!/sbin/sh
# Start/stop Oracle TNS listener
# NOTE that TNS listener must start AFTER dbstart (S97oracle start)
# and stop BEFORE (K20oracle stop).

/bin/logger $0 $1

case "$1" in
'start')
	su oracle -c "/oracle/app/oracle/product/8.1.6/bin/tnsctl start"
	;;
'stop')
	su oracle -c "/oracle/app/oracle/product/8.1.6/bin/tnsctl stop"
	;;
*)
	echo "Usage: $0 { start | stop }"
	exit 1
	;;
esac
exit 0

Install this script as /etc/init.d/tns then symlink it:

# link -s /etc/init.d/tns /etc/rc3.d/S98tns
# link -s /etc/init.d/tns /etc/rc1.d/K20tns
# link -s /etc/init.d/tns /etc/rc0.d/K20tns
# link -s /etc/init.d/tns /etc/rcS.d/K20tns


Please Note

If a search engine dropped you directly into this document, you should go to the index page to find out what you're reading. This document is a record of a project from 1999-2000 -- it is not a current guide to installing any software product.