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 -> Re: Oracle db_shut

Re: Oracle db_shut

From: David Ng <david_ng_at_mindlink.bc.ca>
Date: 1996/11/30
Message-ID: <329FEEDF.105A@mindlink.bc.ca>

Hi,

The scripts that you are using to shutdown the database before reboot you system are based on one unreleastic assumption - There is not active oracle session while you shutdown the database.

The default dbshut script assume the database should be shutdown in a gentle manner. When there is no active session in Oracle database, your script does shutdown the database and everything is fine. In the other hand, if there is active session in the database, your dbshut script will wait for the user log off from the Oracle database. As a result, database is not down.

The default shutdown option in dbshut is 'shutdown'. I would suggest you should use 'shutdwon immediate' in which all active session will be forced out and database will be shut down.

I wish this answer would be helpful.

David Ng

Arcadio Ortega Reinoso wrote:
>
> 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 Sat Nov 30 1996 - 00:00:00 CST

Original text of this message

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