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: Recovery possible?

Re: Recovery possible?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 03 Jul 1999 16:19:57 GMT
Message-ID: <378337a3.5976633@newshost.us.oracle.com>


A copy of this was sent to "Mark Malakanov" <markmal_at_sprint.ca> (if that email address didn't require changing) On Sat, 3 Jul 1999 11:58:46 -0300, you wrote:

>May be I misunderstand. But.
>
>What what happens when Oracle aborted?
>- Instance shutdown immediately,
>- No uncommited transaction does rollback.
>- Unarchived redo log files stay unarchived.
>
>What what happens when Oracle starts after this?
>- Oracle roll forward all data changies from current redo log to SGA.
>- Oracle rollback uncommited transactions.
>- Oracle switch redo log.
>All of this happens without difference of ARCHIVELOG or NOARCHIVELOG.
>- If ARCHIVELOG mode set, ARCH process writes unarchived redo logs to
>archive log.
>

lets say it is sunday.

you shutdown abort and backup.

you are in archive log mode.

it is monday -- all is well, you generate lots of archive redo log. it is tuesday -- tuesday is not so good. Your disk drive with a very important tablespace on it fails.

Normally (if you had backed up a shutdown normal or did a hot backup) you would restore the affected file(s) (only the datafiles -- no LOG FILES) and apply your archived redo log and current online redo log to it to recover it fully. Back in business.

Unfortunately -- you backed up a shutdown abort'ed datafile. You cannot restore JUST that affected file you must restore ALL FILES. Also, you must *restore the online redo log* you copied at the point in time of your 'backup'. This is so the instance can recover the files (the roll forward/rollback). This is not they way we recover a database in archive log mode. to recover a database in archive log mode you only restore the files from the last HOT or COLD (shutdown normal) backup and recover those files. It is important that the online redo log that is current is not overwritten and that you never backup online redo log files (for archive log mode databases).

You cannot apply your archived redo log files to this database because the online redo log files you JUST restored *overlap* with some archived redo log files (at some point on monday -- the redo you backed up on sunday became archived redo log -- you cannot apply that archive redo log any more, you broke the chain, your archives are useless).

shutdown abort + backup + archive log mode *does not make any sense*

>Therefore, If you made backup of datafiles of aborted DB, your commited(!)
>information will saved firstly inside the current redo log file, and
>secondly written to archive log.
>And you can roll forward from any backup (aborted or normal shutdown), or
>even from hot backup. All data changies saved in a set of archive log files
>and unarchived redo logs.
>
>You need not turn your database to NOARCHIVELOG mode before SHUTDOWN ABORT.
>

I never said you did, what I said was -- if you shutdown abort and backup YOU MIGHT AS WELL run in noarchive log mode because it is pointless to be in archive log mode since you cannot use your archived redo logs anyway. Why go through the pains of being in archive log mode if you cannot use them?

shutdown abort + backup = *really bad idea*

shutdown abort + startup with restricted session + shutdown normal + backup = good idea

hot backup = better idea

>Regards,
>Mark Malakanov
>
>

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Jul 03 1999 - 11:19:57 CDT

Original text of this message

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