Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle db_shut

Oracle db_shut

From: Arcadio Ortega Reinoso <arcadio_at_veleta>
Date: 1996/11/29
Message-ID: <57nejq$6fm@erika.cica.es>#1/1

        Hello!:

        Maybe somebody could help us with this: We have installed Oracle 6.0.37.1 on a SparcStation 1000 running Solaris 2.3. It's for academic purposes and over 300 students of 3 different courses use it.

        The machine is to be rebooted automatically by a cron job every midnight...


# crontab -l
#ident  "@(#)root       1.11    93/04/08 SMI"   /* SVr4.0 1.1.3.1       */
#
# The root crontab should be used to perform accounting data collection.
#

...
0 0 * * * /sbin/shutdown -y -g30 -i6
#

        ...and Oracle should also shutdown when the script /sbin/rc0 says...



% pwd

/sbin
% more rc0

#!/sbin/sh
...
if [ -d /etc/rc0.d ]
then
        for f in /etc/rc0.d/K*
        {
                if [ -s ${f} ]
                then
                        case ${f} in
                                *.sh)   .        ${f} ;;        # source it
                                *)      /sbin/sh ${f} stop ;;   # sub shell
                        esac
                fi
        }

...

        ...because we made a K-file to do a dbshut...



% pwd
/etc/rc0.d                                       |

% ls v
K00ANNOUNCE K47asppp K69autofs K05dbshut <----- there K20lp K50utmpd K66nfs.server K70cron K42audit K55syslog K68rpc K75nfs.client
%
% cat K05dbshut

su - oracle -c /opt2/oracle/bin/dbshut
%

        ... and the corresponding S-file to wake Oracle up...



% pwd

/etc/rc2.d
% ls
K20lp           S20sysetup      S71sysid.sys     S92volmgt
K60nfs.server   S21perf         S72autoinstall   S95orasrv   <---- there
K65nfs.client   S30sysid.net    S72inetsvc       S96dbstart  <----
K92volmgt       S47asppp        S73autofs        S99audit
...
%
% cat S95*

su - oracle -c /opt2/oracle/bin/orasrv
% cat S96*

su - oracle -c /opt2/oracle/bin/dbstart %

        ...but sometimes, the following day we find an incomplete reboot. When we log into the machine, we find...

  1. "dbshut" process running
  2. ***and!*** "dbstart" process !!!

        The machine works. Oracle doesn't, of course. Users can log into the system and work as long as they don't touch Oracle. When we notice the problem and kill the "dbshut" (which may have accumulated several elapsed time hours), the machine hangs up. Completely. Only <Stop>A works then.

        Does anybody knows why? What's the meaning of the line

> ...
>                                *.sh)   .        ${f} ;;        # source it
> ...
	... in /sbin/rc0? (specially the dot ".")? Should the other line...

> ...
>                               *)      /sbin/sh ${f} stop ;;   # sub shell
>

        ... (which starts /etc/rc0.d/K05dbshut) block the /sbin/rc0 script until K05dbshut finishes? If so, why then we find "dbstart" processes when there are still "dbshut" processes running?

        If not, (that was our first suspicion), then is it possible for the reboot procedure to reach state 0 _before_ dbshut terminates?? Then would it make any sense to rename K05dbshut to K05dbshut.sh?? We tried it and the system then doesn't even stays alive. Only <Stop>A works.

        Also, the beginnning of our /opt2/oracle/bin scripts gets us confused. What does mean ":"??



% pwd

/opt2/oracle/bin
% ls db*

dbfsize dbshut dbstart dbhome
% head -3 dbs*

==> dbshut <==
:
#
# $Header: dbshut.sh.pp 7.6 93/07/29 16:32:31 plobo Osd<unix> $ dbshut.sh.pp Copyr (c) 1991 Oracle

==> dbstart <==
:
#
# $Header: dbstart.sh.pp 7.5 93/07/29 16:59:56 plobo Osd<unix> $ dbstart.sh.pp Copyr (c) 1991 Oracle %


        Thank you very much for reading up to this point, and thanks in advance for any help. Received on Fri Nov 29 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US