11 | 12 | 2017
Latest Articles
Popular Articles

RMAN

Can we recover through resetlogs ? Yes we can

User Rating:  / 0
PoorBest 

Can we recover through resetlogs ? Yes we can.

 

1. There was a full backup on 14/09/2010
2  On 15/09/2010 there was batch processing going on which may not be lost
3. but on 15/09/2010 the latest batch process was started and we need to roll it back
4. on 16/09/2010 a first point in time recovery was done and the database was opened with resetlogs, thus we have a new incarnation ( we did NOT take a full backup afterwards )
5. on 16/09/2010 there were additional steps launched but
6. on 16/09/2010 the latest step failed.
7. So on 17/09/2010 yet another point in time recovery was needed

The backup of 14/09/2010 is a startpoint but the recovery is to be done in 2 steps

First step is to be done with the old controlfiles ( which needed to be restored from the backup )
1. So we shutdown immediate
2. Rename the current control files ( NEVER DELETE YOUR CURRENT CONTROL FILES )
3  Start with nomount
4. restore the old control files ( the ones which belong to the incarnation "14/09/2010" )
5. bring the database in mount stage
6. reset database incarnation and recover until the first resetlogs SCN
7. shutdown immediate the database instance
8. re-use the most recent controlfiles ( the one which belong to the incarnation 16/09/2010 time about 12 PM CET )
9. We recover until the point in time we would like ( 16/09/2010 time about 2:32 PM CET
10. We open the database with resetlogs
(11. make a recapitulation and put it on our website :) )


I found an excellent guideline on Oracle' s Metalink


How to Recover Through a Resetlogs Command Using RMAN [ID 237232.1]      


Initially I did not use the old control files ( the one which belonged to the first incarnation 14/09/2010 )

While I tried to initiate recovery I got this wierd error


ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [kcvsor_current_inc_rdfail], [0],[], [], [], [], [], []

I found

[Kcvsor_current_inc_rdfail], [0] Recovering Using Rman Ora -600 [ID 378273.1]      
Modified 03-OCT-2006     Type PROBLEM     Status PUBLISHED     


I was in a bad mood, everything needed to go fast and then we start with these kind of errors. But I knew from 10G R1 onwards we can recover through resetlogs.
I remembered I did a reset incarnation with RMAN some years ago, so I found the above Metalink Note telling me to use the old control files, shutdown the instance and rename the current control files
( NEVER WE DELETE THE CURRENT CONTROL FILES )

 

STEP A : Rename the current control files

[oracle@cenbraheadb701 BRAHEA]$ ls -l
-rw-r-----  1 oracle oinstall  7847936 Sep 17 15:20 control02.ctl
-rw-r-----  1 oracle oinstall  7847936 Sep 17 15:20 control01.ctl
[oracle@cenbraheadb701 BRAHEA]$ mv control01.ctl control01.ctl.new
[oracle@cenbraheadb701 BRAHEA]$ mv control02.ctl control02.ctl.new
[oracle@cenbraheadb701 BRAHEA]$

STEP B : Start with nomount


Also I have thrown an eye on the database instance alert log. ( which is very wise )
and I found the first point in time recovery and the resetlogs SCN  



Media Recovery Complete (BRAHEA)
Completed: alter database recover logfile '/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_16/o1_mf_1_6860_693th65p_.arc'
Thu Sep 16 11:59:49 2010
alter database open resetlog
Thu Sep 16 11:59:49 2010
Errors in file /u01/app/oracle/admin/BRAHEA/udump/BRAHEA_ora_25961.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u02/oradata/BRAHEA/redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Thu Sep 16 11:59:49 2010
Errors in file /u01/app/oracle/admin/BRAHEA/udump/BRAHEA_ora_25961.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u02/oradata/BRAHEA/redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RESETLOGS after incomplete recovery UNTIL CHANGE 8835759361295
Resetting resetlogs activation ID 519594247 (0x1ef86107)
Thu Sep 16 11:59:49 2010
Errors in file /u01/app/oracle/admin/BRAHEA/udump/BRAHEA_ora_25961.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u02/oradata/BRAHEA/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Thu Sep 16 11:59:50 2010
Errors in file /u01/app/oracle/admin/BRAHEA/udump/BRAHEA_ora_25961.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u02/oradata/BRAHEA/redo02.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Thu Sep 16 11:59:51 2010
Errors in file /u01/app/oracle/admin/BRAHEA/udump/BRAHEA_ora_25961.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u02/oradata/BRAHEA/redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Thu Sep 16 11:59:52 2010
Setting recovery target incarnation to 2

 

STEP C : restore the old control files


[oracle@cenbraheadb701 scripts]$ rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Sep 17 14:44:42 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: BRAHEA (not mounted)

RMAN> connect catalog rman/abd7namr@rmancat;

connected to recovery catalog database

RMAN> restore controlfile from '/u01/rman/BRAHEA/CT_BRAHEA_qglo00tu_1_1_20100915';

Starting restore at 17-SEP-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=83 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/u02/oradata/BRAHEA/control01.ctl
output filename=/u02/oradata/BRAHEA/control02.ctl
output filename=/u03/oradata/BRAHEA/control03.ctl
Finished restore at 17-SEP-10


STEP D : bring the database in mount stage


RMAN> sql "alter database mount";

sql statement: alter database mount
released channel: ORA_DISK_1

 

STEP E : reset database incarnation and recover until the first resetlogs SCN
the recover is done un miltiple steps since I there was a lack of disk space to restore all the archived redo logs in 1 time.

Note the reset scn we find here is 1 above the resetlogs SCN

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
60577   60578        BRAHEA  519576839        PARENT   1                             16-JUL-08
60577   59289237 BRAHEA  519576839        ORPHAN   8835759361296  16-SEP-10
60577   59353392 BRAHEA  519576839        CURRENT 8835759370069 17-SEP-10

RMAN> reset database to incarnation 60578;

database reset to incarnation 60578

 

RMAN> run {
2> set until logseq 6700;
3> restore database;
4> recover database;
5> }

executing command: SET until clause

Starting restore at 17-SEP-10
Starting implicit crosscheck backup at 17-SEP-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=83 devtype=DISK
Crosschecked 28 objects
Finished implicit crosscheck backup at 17-SEP-10

Starting implicit crosscheck copy at 17-SEP-10
using channel ORA_DISK_1
Finished implicit crosscheck copy at 17-SEP-10

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_177_6963s5bo_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_178_6963wjg0_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_179_6963zv9w_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_180_696436yy_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_181_69646m1y_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_182_69649z0m_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_183_6964fbcr_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_184_6964jnk6_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_185_6964myro_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_186_6964qbbj_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_187_6964tp5y_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_188_6964y1dd_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_189_69651f03_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_190_69654sk9_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_191_696584xb_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_192_6965chfm_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_193_6965gv24_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_194_6965l6f2_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_195_6965oljv_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_196_6965rycy_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_197_6965w9r0_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_198_6965zo3t_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_199_69662zbp_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_1_696p3h6l_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_2_696p3r7n_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_3_696p49co_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_4_696qhvt9_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6733_696mmwvc_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6734_696mmwvj_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6731_696mmwz1_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6730_696mmx02_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6732_696mmx0c_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6727_696mnd02_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6726_696mnd08_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6729_696mnd3d_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6728_696mnd3n_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6725_696mnd3v_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6752_696mnv2g_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6751_696mnv2n_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6750_696mnv6g_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6754_696mnv6p_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6753_696mnv6y_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6740_696mob7r_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6743_696mob7x_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6742_696mobbt_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6744_696mobc2_.arc
File Name: /u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6741_696mobcb_.arc

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u04/oradata/BRAHEA/system01.dbf
restoring datafile 00002 to /u04/oradata/BRAHEA/undotbs01.dbf
restoring datafile 00003 to /u04/oradata/BRAHEA/sysaux01.dbf
restoring datafile 00004 to /u04/oradata/BRAHEA/users01.dbf
restoring datafile 00005 to /u04/oradata/BRAHEA/api_stage_d01.dbf
restoring datafile 00006 to /u04/oradata/BRAHEA/api_stage_i01.dbf
restoring datafile 00007 to /u04/oradata/BRAHEA/audit_data01.dbf
restoring datafile 00008 to /u04/oradata/BRAHEA/ctmspifid01.dbf
restoring datafile 00009 to /u04/oradata/BRAHEA/ctmspifii01.dbf
restoring datafile 00010 to /u04/oradata/BRAHEA/imp_htrn_d01.dbf
restoring datafile 00011 to /u04/oradata/BRAHEA/imp_htrn_i01.dbf
restoring datafile 00012 to /u04/oradata/BRAHEA/imp_long_d01.dbf
restoring datafile 00013 to /u04/oradata/BRAHEA/imp_long_i01.dbf
restoring datafile 00014 to /u04/oradata/BRAHEA/imp_lref_d01.dbf
restoring datafile 00015 to /u04/oradata/BRAHEA/imp_lref_i01.dbf
restoring datafile 00016 to /u04/oradata/BRAHEA/imp_ltrn_d01.dbf
restoring datafile 00017 to /u04/oradata/BRAHEA/imp_ltrn_i01.dbf
restoring datafile 00018 to /u04/oradata/BRAHEA/irt_htrn_d01.dbf
restoring datafile 00019 to /u04/oradata/BRAHEA/irt_htrn_i01.dbf
restoring datafile 00020 to /u04/oradata/BRAHEA/irt_ltrn_d01.dbf
restoring datafile 00021 to /u04/oradata/BRAHEA/irt_ltrn_i01.dbf
restoring datafile 00022 to /u04/oradata/BRAHEA/isite_d01.dbf
restoring datafile 00023 to /u04/oradata/BRAHEA/isite_i01.dbf
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/DB_BRAHEA_otlntbqn_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/DB_BRAHEA_otlntbqn_1_1 tag=TAG20100914T204510
channel ORA_DISK_1: restore complete, elapsed time: 00:03:15
Finished restore at 17-SEP-10

Starting recover at 17-SEP-10
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6688
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6689
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_p1lntc4v
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_p1lntc4v tag=TAG20100914T204947
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6688_696s3sln_.arc thread=1 sequence=6688
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6688_696s3sln_.arc recid=6227 stamp=729960735
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6689_696s3slt_.arc thread=1 sequence=6689
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6689_696s3slt_.arc recid=6226 stamp=729960729
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6690
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6691
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6692
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6693
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6694
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_p6lnvcha
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_p6lnvcha tag=TAG20100915T150737
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6690_696s41tz_.arc thread=1 sequence=6690
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6690_696s41tz_.arc recid=6228 stamp=729960750
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6691_696s41v6_.arc thread=1 sequence=6691
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6691_696s41v6_.arc recid=6229 stamp=729960750
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6692_696s41vh_.arc thread=1 sequence=6692
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6692_696s41vh_.arc recid=6230 stamp=729960750
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6693_696s41rd_.arc thread=1 sequence=6693
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6693_696s41rd_.arc recid=6231 stamp=729960750
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6694_696s41r6_.arc thread=1 sequence=6694
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6694_696s41r6_.arc recid=6232 stamp=729960750
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6695
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6696
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6697
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6698
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6699
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_phlnvco5
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_phlnvco5 tag=TAG20100915T150737
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6695_696s55hq_.arc thread=1 sequence=6695
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6695_696s55hq_.arc recid=6233 stamp=729960786
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6696_696s55hy_.arc thread=1 sequence=6696
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6696_696s55hy_.arc recid=6234 stamp=729960786
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6697_696s55lg_.arc thread=1 sequence=6697
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6697_696s55lg_.arc recid=6235 stamp=729960786
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6698_696s55lp_.arc thread=1 sequence=6698
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6698_696s55lp_.arc recid=6236 stamp=729960786
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6699_696s55ly_.arc thread=1 sequence=6699
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6699_696s55ly_.arc recid=6237 stamp=729960786
media recovery complete, elapsed time: 00:00:20
Finished recover at 17-SEP-10

....

recovery in multiple steps, the latest step is the recovery until the SCN at which the first resetlogs was done
( RESETLOGS after incomplete recovery UNTIL CHANGE 8835759361295 )

 

RMAN> run {
2> set until scn 8835759361295;
3> recover database;
4> }

 

executing command: SET until clause

Starting recover at 17-SEP-10
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6840
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_q2lnvd95
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_q2lnvd95 tag=TAG20100915T151618
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6840_696tf744_.arc thread=1 sequence=6840
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6840_696tf744_.arc recid=6358 stamp=729962056
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6841
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6842
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6843
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6844
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6845
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_q3lnvdb5
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_q3lnvdb5 tag=TAG20100915T152317
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6841_696tfcxd_.arc thread=1 sequence=6841
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6841_696tfcxd_.arc recid=6363 stamp=729962071
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6842_696tfd0p_.arc thread=1 sequence=6842
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6842_696tfd0p_.arc recid=6359 stamp=729962071
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6843_696tfcxl_.arc thread=1 sequence=6843
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6843_696tfcxl_.arc recid=6362 stamp=729962071
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6844_696tfd16_.arc thread=1 sequence=6844
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6844_696tfd16_.arc recid=6361 stamp=729962071
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6845_696tfd0y_.arc thread=1 sequence=6845
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6845_696tfd0y_.arc recid=6360 stamp=729962071
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6846
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6847
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6848
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6849
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6850
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_q4lnvdbv
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_q4lnvdbv tag=TAG20100915T152317
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6846_696tg3wb_.arc thread=1 sequence=6846
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6846_696tg3wb_.arc recid=6368 stamp=729962095
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6847_696tg3yx_.arc thread=1 sequence=6847
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6847_696tg3yx_.arc recid=6364 stamp=729962095
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6848_696tg407_.arc thread=1 sequence=6848
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6848_696tg407_.arc recid=6366 stamp=729962095
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6849_696tg3wj_.arc thread=1 sequence=6849
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6849_696tg3wj_.arc recid=6367 stamp=729962095
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6850_696tg3z6_.arc thread=1 sequence=6850
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6850_696tg3z6_.arc recid=6365 stamp=729962095
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6851
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6852
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6853
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6854
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6855
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_q5lnvdcf
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_q5lnvdcf tag=TAG20100915T152317
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6851_696tgwxk_.arc thread=1 sequence=6851
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6851_696tgwxk_.arc recid=6369 stamp=729962120
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6852_696tgwv2_.arc thread=1 sequence=6852
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6852_696tgwv2_.arc recid=6373 stamp=729962120
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6853_696tgwtw_.arc thread=1 sequence=6853
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6853_696tgwtw_.arc recid=6372 stamp=729962120
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6854_696tgwxs_.arc thread=1 sequence=6854
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6854_696tgwxs_.arc recid=6370 stamp=729962120
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6855_696tgwy3_.arc thread=1 sequence=6855
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6855_696tgwy3_.arc recid=6371 stamp=729962120
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6856
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6857
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6858
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_q6lnvdcv
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_q6lnvdcv tag=TAG20100915T152317
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6856_696thp9c_.arc thread=1 sequence=6856
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6856_696thp9c_.arc recid=6375 stamp=729962140
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6857_696thpcy_.arc thread=1 sequence=6857
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6857_696thpcy_.arc recid=6376 stamp=729962140
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6858_696thpfv_.arc thread=1 sequence=6858
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6858_696thpfv_.arc recid=6374 stamp=729962137
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6859
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6860
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qalo00qg
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qalo00qg tag=TAG20100915T205527
channel ORA_DISK_1: restore complete, elapsed time: 00:00:17
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6859_696tjc25_.arc thread=1 sequence=6859
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6859_696tjc25_.arc recid=6377 stamp=729962165
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6860_696tjc4h_.arc thread=1 sequence=6860
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6860_696tjc4h_.arc recid=6378 stamp=729962165
media recovery complete, elapsed time: 00:01:46
Finished recover at 17-SEP-10

RMAN>

 

STEP F: re-use the most recent controlfiles ( shutdown the database instance prior to the renaming of the control files (not shown))


-rw-r-----  1 oracle oinstall  8568832 Sep 17 12:54 control02.ctl.new
-rw-r-----  1 oracle oinstall  8568832 Sep 17 12:54 control01.ctl.new
-rw-r-----  1 oracle oinstall  7847936 Sep 17 15:20 control02.ctl
-rw-r-----  1 oracle oinstall  7847936 Sep 17 15:20 control01.ctl
[oracle@cenbraheadb701 BRAHEA]$ mv control01.ctl control01.ctl.old_inc
[oracle@cenbraheadb701 BRAHEA]$ mv control02.ctl control02.ctl.old_inc
[oracle@cenbraheadb701 BRAHEA]$ mv control01.ctl.new control01.ctl
[oracle@cenbraheadb701 BRAHEA]$ mv control02.ctl.new control02.ctl
[oracle@cenbraheadb701 BRAHEA]$

 

STEP G: We recover until the point in time we would like


[oracle@cenbraheadb701 scripts]$ rman target /

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: BRAHEA

RMAN> connect catalog rman/abd7namr@rmancat;

connected to recovery catalog database

RMAN> reset database to incarnation 59289237;

database reset to incarnation 59289237;

RMAN> run {
2> set until logseq 36;
3> recover database;
4> }

executing command: SET until clause

Starting recover at 17-SEP-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=167 devtype=DISK

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6860
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qalo00qg
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qalo00qg tag=TAG20100915T205527
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=1
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=2
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=3
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=4
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qklo1qpl
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qklo1qpl tag=TAG20100916T132509
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_1_696vgwhv_.arc thread=1 sequence=1
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_1_696vgwhv_.arc recid=6647 stamp=729963142
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_2_696vgwdv_.arc thread=1 sequence=2
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_2_696vgwdv_.arc recid=6649 stamp=729963142
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_3_696vgwkr_.arc thread=1 sequence=3
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6860_696vgf5k_.arc recid=6645 stamp=729963127
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_3_696vgwkr_.arc recid=6648 stamp=729963142
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_4_696vgwl3_.arc thread=1 sequence=4
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_4_696vgwl3_.arc recid=6646 stamp=729963141
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=20
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=21
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=22
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=23
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=24
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qnlo3pvj
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qnlo3pvj tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:17
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=5
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qolo3q03
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qolo3q03 tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_5_696vjfhx_.arc thread=1 sequence=5
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_5_696vjfhx_.arc recid=6656 stamp=729963192
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6_696vjfcw_.arc thread=1 sequence=6
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_6_696vjfcw_.arc recid=6659 stamp=729963192
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_7_696vjfj5_.arc thread=1 sequence=7
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_7_696vjfj5_.arc recid=6657 stamp=729963192
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_8_696vjfd2_.arc thread=1 sequence=8
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_8_696vjfd2_.arc recid=6658 stamp=729963192
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_9_696vjfhp_.arc thread=1 sequence=9
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_9_696vjfhp_.arc recid=6655 stamp=729963192
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=30
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=31
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=32
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=33
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=34
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qplo3q0j
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qplo3q0j tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=35
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qqlo3q14
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qqlo3q14 tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=17
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=18
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=19
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qslo3q2o
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qslo3q2o tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=25
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=26
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=27
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=28
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=29
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qtlo3q38
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qtlo3q38 tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=11
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=12
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=13
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=14
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qvlo3q4i
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qvlo3q4i tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_10_696vm0xd_.arc thread=1 sequence=10
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_10_696vm0xd_.arc recid=6676 stamp=729963276
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_11_696vm0xl_.arc thread=1 sequence=11
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_11_696vm0xl_.arc recid=6677 stamp=729963276
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_12_696vm11j_.arc thread=1 sequence=12
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_12_696vm11j_.arc recid=6678 stamp=729963276
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_13_696vm11r_.arc thread=1 sequence=13
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_13_696vm11r_.arc recid=6679 stamp=729963276
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_14_696vm120_.arc thread=1 sequence=14
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_14_696vm120_.arc recid=6680 stamp=729963276
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_15_696vl1ry_.arc thread=1 sequence=15
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_15_696vl1ry_.arc recid=6668 stamp=729963244
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_16_696vl1oo_.arc thread=1 sequence=16
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_16_696vl1oo_.arc recid=6667 stamp=729963244
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_17_696vl1s6_.arc thread=1 sequence=17
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_17_696vl1s6_.arc recid=6669 stamp=729963244
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_18_696vl1oj_.arc thread=1 sequence=18
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_18_696vl1oj_.arc recid=6666 stamp=729963244
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_19_696vl1sg_.arc thread=1 sequence=19
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_19_696vl1sg_.arc recid=6670 stamp=729963244
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_20_696vhx89_.arc thread=1 sequence=20
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_20_696vhx89_.arc recid=6652 stamp=729963176
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_21_696vhxck_.arc thread=1 sequence=21
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_21_696vhxck_.arc recid=6650 stamp=729963176
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_22_696vhxcs_.arc thread=1 sequence=22
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_22_696vhxcs_.arc recid=6651 stamp=729963176
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_23_696vhxc9_.arc thread=1 sequence=23
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_23_696vhxc9_.arc recid=6653 stamp=729963176
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_24_696vhx83_.arc thread=1 sequence=24
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_24_696vhx83_.arc recid=6654 stamp=729963176
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_25_696vlkt1_.arc thread=1 sequence=25
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_25_696vlkt1_.arc recid=6671 stamp=729963260
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_26_696vlkxs_.arc thread=1 sequence=26
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_26_696vlkxs_.arc recid=6674 stamp=729963260
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_27_696vlkt8_.arc thread=1 sequence=27
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_27_696vlkt8_.arc recid=6672 stamp=729963260
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_28_696vlkxj_.arc thread=1 sequence=28
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_28_696vlkxj_.arc recid=6673 stamp=729963260
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_29_696vlky1_.arc thread=1 sequence=29
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_29_696vlky1_.arc recid=6675 stamp=729963260
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_30_696vk3g7_.arc thread=1 sequence=30
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_30_696vk3g7_.arc recid=6660 stamp=729963214
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_31_696vk3kp_.arc thread=1 sequence=31
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_31_696vk3kp_.arc recid=6661 stamp=729963214
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_32_696vk3g1_.arc thread=1 sequence=32
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_32_696vk3g1_.arc recid=6664 stamp=729963214
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_33_696vk3ky_.arc thread=1 sequence=33
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_33_696vk3ky_.arc recid=6662 stamp=729963214
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_34_696vk3l7_.arc thread=1 sequence=34
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_34_696vk3l7_.arc recid=6663 stamp=729963214
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_35_696vklky_.arc thread=1 sequence=35
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_35_696vklky_.arc recid=6665 stamp=729963230
media recovery complete, elapsed time: 00:00:38
Finished recover at 17-SEP-10


RMAN> run {
2> set until logseq 37;
3> recover database;
4> }

executing command: SET until clause

Starting recover at 17-SEP-10
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=36
channel ORA_DISK_1: reading from backup piece /u01/rman/BRAHEA/AL_BRAHEA_qqlo3q14
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/BRAHEA/AL_BRAHEA_qqlo3q14 tag=TAG20100917T072330
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_36_696vrjyd_.arc thread=1 sequence=36
channel default: deleting archive log(s)
archive log filename=/u05/oradata/flash_area_recovery/BRAHEA/archivelog/2010_09_17/o1_mf_1_36_696vrjyd_.arc recid=6681 stamp=729963452
media recovery complete, elapsed time: 00:00:02
Finished recover at 17-SEP-10



STEP H : We open the database with resetlogs

RMAN> sql "alter database open resetlogs";

sql statement: alter database open resetlogs
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

 

We did it. We used a backup from the old incarnation, recovered this backup until the resetlogs SCN (as indicated in the alert file) using the control files which belonged to that incarnation and then in a second step we used the control files which belonged to the newer incarnation and recovered until the SCN we wanted.

Note in this example the second step recovery is a cancel based recovery. This procedure can also be used as a draft for a complete recovery using a backup belonging to an old incarnation. The second step is then not a "set until" recovery but a complete database recovery.