Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

recovery with until cancel and without

1 view
Skip to first unread message

yls177

unread,
May 21, 2004, 1:28:31 AM5/21/04
to
from my understanding after reading the posts, i realized that with
until cancel, oracle will recover till the databae crash or have some
problems. after this, u can alter database open resetlogs for oracle
to start fine but then u will lose some data, right?

and if u dont use until cancel, oracel will automatically recover by
itself.

but then i still dont think that it makes a difference, only that with
until cancel, oracle will stop recovering till the time which it
crashed.

also, i have searched google and from below

quote:
--------------------------------------------------------------------------------

the "UNTIL CANCEL" clause specifies that you're performing an
incomplete
recovery. If you omit it then Oracle assumes that you want to perform
a
complete recovery.

If you specify a BACKUP CONTROLFILE then Oracle uses the file headers
rather
than control file information to control the restore. For the record,
if you
cancel it as you did in scenario 2 (where it failed) you can usually
rerun
"recover database using backup controlfile until cancel;", enter
"cancel"
immediately and then "alter database open resetlogs". This should open
the
database properly.

I have to admit that I don't know what difference these clauses make
at the
instance/control file level which is why I didn't reply at first.
I could speculate that using a backup controlfile forces Oracle to
search
the file headers for the highest SCN and uses that as it's target SCN
for
the restore. I could further theorise that "UNTIL CANCEL" overrides
this
behaviour and lets you terminate the restore at any point without
regard to
the SCNs stored in the datafile headers.
Mind you without going and playing with a recovery this is all
conjecture.
If anyone can authoritatively confirm or deny this I'd appreciate it
as it
doesn't seem to be documented anywhere.

Howard J. Rogers

unread,
May 21, 2004, 6:56:49 AM5/21/04
to

"yls177" <yls...@hotmail.com> wrote in message
news:c06e4d68.04052...@posting.google.com...

> from my understanding after reading the posts, i realized that with
> until cancel, oracle will recover till the databae crash or have some
> problems.

No, "recover until cancel" means "keep applying redo until I tell you to
stop". You pick the point where you want to type the word "cancel", and
hence it has nothing to do with the point where the database crashes,
necessarily.

>after this, u can alter database open resetlogs for oracle
> to start fine but then u will lose some data, right?

If you ever stop applying redo before the point where Oracle would naturally
stop applying it, then by definition you have not applied some redo that was
generated by transactions. Therefore, you have not repeated those
transactions. Therefore, you have lost data.

It' called an "incomplete recovery" for a reason.

> and if u dont use until cancel, oracel will automatically recover by
> itself.

Well, sort of. You have to type in the words "recover database", so it's
hardly automatic. But yes, if you don't use the words 'until cancel' or
'until time' then Oracle will apply every last drop of redo.

> but then i still dont think that it makes a difference, only that with
> until cancel, oracle will stop recovering till the time which it
> crashed.

It's got nothing to do with when the database crashed. Instance crashes
don't even need any manual recovery commands at all. Instance recoveries
really are totally and utterly automatic.

> also, i have searched google and from below

I'd suggest http://tahiti.oracle.com. There's a lot about recovery you don't
seem to be getting. Which is fair enough, but you need to nail this subject.


>
>
> quote:
> --------------------------------------------------------------------------

Precisely so. Spot on. Ordinarily, the control file is our 'master clock'
and tells us the SCN to which all the datafiles should be synchronised. The
'using backup controlfile' clause tells Oracle not to pay any attention to
what the control file says, because you've flagged it to be well out of date
before you start.

>I could further theorise that "UNTIL CANCEL" overrides
> this
> behaviour and lets you terminate the restore at any point without
> regard to
> the SCNs stored in the datafile headers.

They're not mutually exclusive. Until cancel means, as I've said, "apply
redo (ie, recover) until I tell you to stop". The "using backup controlfile"
means "and don't trust what the control file tells you". You can do the one
without the other. It depends on whether you can trust what the control
file's SCN is (if you haven't restored it from a backup, then yes you can).

> Mind you without going and playing with a recovery this is all
> conjecture.
> If anyone can authoritatively confirm or deny this I'd appreciate it
> as it
> doesn't seem to be documented anywhere.

Well, that's a bit silly. Of course it's documented. In lots of places. That
the documentation provided by Oracle might not be terribly understandable is
a rather different matter.

You first need to get the distinction between complete and incomplete
recoveries clear in your head.

Then you need to understand that all recoveries, complete and incomplete
work by knowing what the control file's SCN is.

Then you will understand what a mess you'll be in when the control file's
SCN is known to be wrong, and why you need a mechanism to tell Oracle 'don't
trust it'.

And then you'll see that you can do a complete recovery 'using backup
controlfile' just as well as you can do an incomplete recovery 'using backup
controlfile'.

Regards
HJR

yls177

unread,
May 21, 2004, 11:14:43 PM5/21/04
to
"Howard J. Rogers" <h...@dizwell.com> wrote in message news:<40ade064$0$3036$afc3...@news.optusnet.com.au>...

thanks HJR...

0 new messages