tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Shutting down DU with Oracle wrt rc?.d scripts
@ 1997-04-09 14:28 Karen Thomas
  0 siblings, 0 replies; only message in thread
From: Karen Thomas @ 1997-04-09 14:28 UTC (permalink / raw)
  To: tru64-unix-managers

Managers,

	Summary is two fold. Original question is at the bottom.

1> Do not use shutdown command use the init command instead. The shutdown
command will not stop the processes in the /sbin/rc?.d directories it will
not wait for them to finish it will just halt the processor. Do a man on
init to find the correct method. Thanks to Brenden Phillips and Matthew
Calthrop for the note about that:

Mathew's note:
	Another point to note: the "shutdown" program does not actually wait for
	the kill scripts (/sbin/rc*.d/K*) to finish before shutting down. It is
	generally a better policy to use "init 0", which does wait. 

--------------------------------------------------------------------------
2> In the Oracle Installation book there is a script you can copy
and put into /sbin/init.d/oracle this script will be called from
/sbin/rc0.d to shutdown the databases and /sbin/rc3.d to start up the
databases and Oracle.  Many people sent attachments and advice, I will
only include the ones that I used:

To create the /sbin/init.d/oracle script:
Matthew Calthrop <matthew.calthrop@reuters.com>:

#!/bin/sh
#
### 14/06/96  MJC  Commented out start/stop of sql*net v1.
ORACLE_HOME=/oracle/product/v716
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`

ORACLE=oracle
export ORACLE_HOME PATH 

ORACLE=oracle

LOG=$ORACLE_HOME/startup.log
touch $LOG
chmod a+r $LOG
#
case $1 in 
'start')
echo "$0: starting up..." >> $LOG
date >> $LOG
# Start sql*net v1
### 14/06/96 MJC - commented out, as we don't use it.
#if [ -f $ORACLE_HOME/bin/orasrv ] ;
#then
#  echo "starting v1 listener..."
#  su $ORACLE -c "$ORACLE_HOME/bin/tcpctl start forkon timeout 10" >> \
#  $LOG 2 >&1
#fi
# Start sql*net v2
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
  echo "starting V2 listener..."
  su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start" >> \
  $LOG 2>&1
fi
echo "Starting Oracle databases..."
su $ORACLE -c "$ORACLE_HOME/bin/dbstart" >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down..." >> $LOG
date >> $LOG
#Stop v1 listener
### 14/06/96 MJC - commented out, as we don't use it.
#if [ -f $ORACLE_HOME/bin/orasrv ] ;
#then
#  echo "Stopping V1 listener..."
#  su $ORACLE -c "$ORACLE_HOME/bin/tcpctl stop" >> $LOG 2>&1
#fi
#Stop V2 listener
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
  echo "Stopping V2 listener..."
  su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" >> $LOG 2>&1
fi
echo "Stopping Oracle databases"
su $ORACLE -c "$ORACLE_HOME/bin/dbshut" >> $LOG 2>&1
;;
*)
  echo "usage: $0: {start | stop}"
  exit
  ;;
esac
#
exit


To create the links:
Dejan Muhamedagic <muja@galeb.etf.bg.ac.yu>:

There should be an example S??oracle and K??oracle scripts: in fact it's
the same script accepting "start" and "stop" arguments.  In general you
put a script (not a link) into /sbin/init.d (say /sbin/init.d/oracle),
then you make appropriate links in /sbin/rc0.d and /sbin/rc3.d (or
rc2.d) like this:
cd /sbin/rc0.d; ln -s ../init.d/oracle K00oracle
cd /sbin/rc3.d; ln -s ../init.d/oracle S99oracle
You have to check permissions for the script after you install it.  In
general, the numbers should be low for K link and high for S link,
because you want to start it after everything and kill it first.

Original question:

=Managers,
=	The other I shut our DU box down using shutdown -now with our new
=Oracle Database freshly installed. I asked our DBA what commands are
=needed to shut and restart oracle along with the system, so that it is
=included into the rcx.d directory.  She told me to use the commands
dbshut
=and dbstart to start and stop Oracle.
=
=	My question is what do I do with these scripts? Do I just put
=a symbolic link to these into the /sbin/rc3.d directory with a name like
=S62oracle and that would do it?  Do I move the files right into the
=directory?  Do I have to write some kind of other scrip to call these two
=scripts?
=
=	I tried searching many sites and it seems like either it is a very
=easy or a very hard question to answer. I've seen answers like "these
=scripts should be incorporated into the rc?.d scripts" What does that
mean
=incorporated?
=
=	To me it seems like a basic answer - but if it is much more
=complicated than that then could someone point me in a direction?

Thanks also to:

Ruben Zelwer <ruben@garnet.berkeley.edu>
Guy Dallaire <dallaire@total.net>
Casey Spangler <spang@probita.com>
Brenden Phillips <B.C.Phillips@massey.ac.nz> 
"Nagaraja, Raja" <Raja.Nagaraja@actew.com.au> 
Kurt Carlson <sxkac@java.sois.alaska.edu>
"Callahan, Drake" <CallahanD@Connext.com> 
Kris Chandrasekhar <Chandrasekh@mail.dec.com>       
James Anderson <anderson@ocaxp1.cc.oberlin.edu>
Randy Rodgers <rrodgers@fwi.com>
Dejan Muhamedagic <muja@galeb.etf.bg.ac.yu> 
"Thomas.Meyer" <meyert@dla-marbach.de>
"Matthew Calthrop" <matthew.calthrop@reuters.com>


------------------------------------------------------------------------------
Karen Thomas

Connecticut State University System Office
Information System
THOMASK@CTSTATEU.EDU
PHONE: (860) 493-0118

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-09 14:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-09 14:28 SUMMARY: Shutting down DU with Oracle wrt rc?.d scripts Karen Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox