Re: Script to handle hanging shutdowns

From: Dick Allie <dallie_at_ionet.net>
Date: 1996/07/23
Message-ID: <31F4EB3F.5278_at_ionet.net>#1/1


J Ford Hill wrote:
>
> Some of our databases hang on shutdown and this prevents our backup script
> from getting a good backup. Does anyone have a script that:
> 1) attempts a shutdown
> 2) checks to make sure the shutdown worked
> AND
> 3) If the shutdown failed, does a shutdown abort, startup,
> and clean shutdown???
>
> I have these specific questions about the above process:
>
> 1) How do you detect if your database did not shut down cleanly.
> Is the existance of the 'sgadef' file the key?
>
> 2) Can a unix script fork off another process that sleeps for a
> few minutes and then does the shutdown abort if the "sgadef"
> still exists?
>
> Thanks in advance.

We have created a script to shutdown the database using shutdown abort first to insure the database is shutdown and connected users who did not log off are killed. We then start the database backup which will rollback or recover the aborted processes. Next step is to get a copy of our control files (alter database backup controlfile to trace;). The final step is to shutdown the database normal (shutdown) and then we do our backup.

Hope this helps. Dick Allie at dallie_at_ionet.net Received on Tue Jul 23 1996 - 00:00:00 CEST

Original text of this message