Re: ORACLE Backups
Date: Wed, 17 Aug 1994 07:38:25 +0000
Message-ID: <777109105snz_at_jfdi.demon.co.uk>
In article <shatzmanCuLpn5.Mu5_at_netcom.com> shatzman_at_netcom.com "bs" writes:
> Johan Streun (jstreun_at_nl.oracle.com) wrote:
>: R Glenn Stauffer (stauffer_at_cc.swarthmore.edu) wrote:
>::bzy_at_ornl.gov writes: >::> >::> >::> Once you do the "shutdown abort",you should bring the database back >::> up again and do a regular shutdown. Then do your file backups. >::> >::> Beverly >::> >:: Why is this? >:: We were using a shutdown abort before backup and haven't experienced >:: problems. However I have been told that this can sometimes lead to >:: situations requiring database recovery. I have modified our backup >:: scripts to use shutdown immediate and notified our users that they must>:: quit their C/S application at day's end to ensure that they do not have >:: uncommitted transactions which will get rolled-back at backup time.
>:: If this does not work reliably (our backup script chokes if the oracle >:: server doesn't shut down), I will have to go back to using shutdown abort. >:: If so, I'd be real interested in knowing whether my failure to start the >:: database and then do a shutdown normal is going to cause me some problems >:: either during backup or, worst of all, when I attempt recovery.
>: When you perform an offline (full) backup it is essential that all your
>: database-files (and online logfiles) are in a consistent state. According
>: to the Oracle7 database administrator manual the only way to ensure this
>: is to do a NORMAL shutdown.
>: The best thing to do in your backupscript (IMHO) is to either shutdown
>: abort or immediate, startup in restricted mode and then do a normal shutdown.
>: Your unix-script would look something like this (Oracle7 + ksh):
>: sqldba <<EOF
>: connect internal
>: shutdown immediate
>: startup restrict
>: shutdown normal
>: EOF
>: In my experience as a DBA this was the method we used before we switched
>: to online backups.
>: Word of advice: Always test your backup-procedure by doing a restore
>: especialy test the worst-case-scenarios.
I've found severe problems trying to shutdown an Oracle database service prior to taking a backup. Users sometimes leave terminals logged in, and we need to 'break' their connection, so we tried :
shutdown abort startup shutdown
and found that it didn't always work! An anonymous Oracle person over here said that sometimes you need a couple of 'shutdown abort' calls before the connections get properly killed. This sounds iffy, but the problem has been seen here on more than one occasion.
Does anyone else have any advice/useful comments they could make?
Paul Wilson
-- CWS Unix SupportReceived on Wed Aug 17 1994 - 09:38:25 CEST