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: suspicious standard Oracle Linux start/stop script

Re: suspicious standard Oracle Linux start/stop script

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Thu, 29 May 2003 15:37:46 GMT
Message-ID: <3ED627D6.D26F490C@telusplanet.net>


LeKaido wrote:

> Version: 9.2.0.1 Opsys: Linux RedHat
>
> Oracle recommends using the following script in
> /etc/init.d/<your_name_for_script>
> for starting/stopping database (also at startup/shutdown).
>
> The full script is referred below. It can also be found in the
> installation guide.
>
> What really bothers me in all this is the line:
>
> su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
>
> As I understand it , it starts a _background_ process that's supposed to
> shutdown oracle during _system_ shutdown.
>
> Is there anyone out there who can comment on what happens , if the
> operating system shutdown completes _before_ oracle has completed?
> I assume there is no "stopping mechanism" there and oracle just gets
> killed before it's done with shutdown with all possible dire
> consequences that could follow.

You are basically right.

The dbshut/dbstart have been around in various forms since late version 6. These are the ones that look in the last column of the oratab file. I'd consider them safe (except that the Linux version for 9iR2 refers to PFILE and hasn't been updated to use SPFILE <sigh>).

Several versions ago, Oracle's documentation or notes stated that the script you showed was only a template to be used in your environment. The startup section is generally OK but, as you indicate, the shutdown might not wait long enough and could - in some very rare instances - cause a problem.

Some recommendations I had seen/heard included putting a delay in the calling script or adding a looping blocking mechanism with notification to encourage the shutdown to wait for an extra x minutes.

Another variant I've seen (but not recommended) is to alter the dbshut to use "shutdown abort". Although I still shudder at "shutdown abort", in the past 2 weeks I've been reminded it is not that serious (and it is potentially safer than a kill -9, depending on coding techniques.)

I'd recommend the sysadmin or DBA has a normal processs to follow to shut down the operating system/server, including a standard database shutdown using the normal/immediate option. (This could be automated/scripted, but should be part of the SA/DBA procedure.) In conjunction with the dbshut/abort variant you then have an automated shutdown abort that kicks in as a last resort. Received on Thu May 29 2003 - 10:37:46 CDT

Original text of this message

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