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: Mark Malakanov <markmal_at_sprint.ca>
Date: Sat, 3 Jul 1999 19:38:42 -0300
Message-ID: <L6xf3.1642$jl.11367819@newscontent-01.sprint.ca>


Hi Thomas.

I made your sample. During 20 minutes, of cource. I dont wait for 3 days :^)

  1. Shutdown instance using SHUTDOWN ABORT.
  2. Copy datafiles (controlfiles and redo logs too, if you will right :^) to a backup folder. Pay attention! - "Dirty" backup!
  3. Startup Oracle. - everything well
  4. Work for a little as Scott. Create table and insert some data to one with commit. Inser second portion without commit.
  5. Kill Oracle80 task using Task Manager. (Failure model)
  6. Rename usr1orcl.ora file (User_data tablespace) to usr1orcl.or~
  7. Copy old "dirty" backuped usr1orcl.ora from backup folder to database.
  8. Try to start Oracle. Of cource one ask me to recover datafile.
  9. Svrmgr screenshot followed: ... Database mounted. ORA-01113: file 2 needs media recovery ORA-01110: data file 2: 'C:\ORAWIN95\DATABASE\USR1ORCL.ORA' SVRMGR> recover datafile 2; ORA-00279: change 255084 generated at 07/03/99 18:33:47 needed for thread 1 ORA-00289: suggestion : C:\ORAWIN95\DATABASE\ARCHIVE\ORCLT0001S0000000500.ARC ORA-00280: change 255084 for thread 1 is in sequence #500 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} Log applied. Media recovery complete. SVRMGR> alter database open; Statement processed.

So, as you see everithig OK. You can use "dirty" backup - backup after abort.
You can check it yourself.
But I don't bring people use this way. "Shutdown Normal" is better of cource.
I use hot backup on my production database.

Note: If your database in NOARCHIVELOG you have to save (and recover) all set of Oracle files (datafiles, redo log files, controlfiles) any way, you use "clean" backup or "dirty".
But In case of "dirty" backup you MUST recover redolog files because an information about data changies is inside this only. In case of "clean" backup information about data changies is already flushed into datafiles and you can recreate redo-logs anew, this useless now.

Regards,
Mark

Thomas Kyte <tkyte_at_us.oracle.com> wrote in message news:378337a3.5976633_at_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 - 17:38:42 CDT

Original text of this message

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