Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: recovery by RMAN for a valid database?
In article <8v400u$d6$1_at_nnrp1.deja.com>,
susana73_at_hotmail.com wrote:
> Hello,
>
> I am doing hotbackup using RMAN. My database isn't crashed and I
didn't
> lose any datafiles. But one of the developers like to recover the
data
> back to a certain point of time(say Wednesday 12pm, 2 days ago).
Anyone
> knows how to do that on RMAN?
>
> Thanks in advance,
>
> Susan
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Assume the following situation:
You run RMAN with a recovery catalog.
You made a backup of PROD1 on July 2, 1999.
You performed incomplete recovery on this database and opened it with the RESETLOGS option on July 10, 1999. A new database incarnation was created.
On July 25, you discover that you need crucial data that was dropped from the database at 8:00 a.m. on July 8, 1999. You decide to reset PROD1 to the prior incarnation, restore the July 2 backup, and then recover to 7:55 a.m. on July 8.
To recover the database using the backup from the old incarnation:
You obtain the primary key of the previous incarnation by executing a list command:
# obtain primary key of old incarnation
list incarnation of database prod1;
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time ------- ------- ------- ------ --- ---------- ---------- 1 2 PROD1 1224038686 NO 1 02-JUL-99 1 582 PROD1 1224038686 YES 59727 10-JUL-99
You reset the incarnation using the primary key that you just obtained:
# reset database to old incarnation
reset database to incarnation 2;
You recover the database, performing the following operations in the run command:
Set the end time for recovery to the time just before the loss of the data.
Allocate one or more channels.
Abort the instance and then re-start it.
Restore the control file and mount it.
Restore and recover the database.
Reset the online redo logs.
run {
set until time 'Jul 8 1999 07:55:00'; # set time to just before data was lost
allocate channel dev1 type disk; shutdown abort; startup nomount; restore controlfile; alter database mount; # mount database after restoring control file restore database; recover database; alter database open resetlogs; # this command automatically resets the database # so that this incarnation is thenew incarnation
I hope this helps.
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Nov 17 2000 - 13:49:48 CST
![]() |
![]() |