ORA-00280 (Recovering a datafile from the archivelogs)


SQL> select name from v$recover_file;
'+DBNAME_DATA_01/dbname/datafile/undotbs2.449.755961101'

SQL> alter database datafile '+DBNAME_DATA_01/dbname/datafile/
undotbs2.449.755961101' online;
alter database datafile '+DBNAME_DATA_01/dbname/datafile/
undotbs2.449.755961101' online
*
ERROR at line 1:
ORA-01113: file 39 needs media recovery
ORA-01110: data file 39: '+DBNAME_DATA_01/dbname/datafile/undotbs2.449.755961101'

Start Manual recovery:

SQL> recover datafile '+DBNAME_DATA_01/dbname/datafile/undotbs2.449.755961101'
ORA-00279: change 12613586221711 generated at 02/27/2012 22:27:23 needed for
thread 2
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1167.882.776418021
ORA-00280: change 12613586221711 for thread 2 is in sequence #1167

Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 12613586221711 generated at 02/26/2012 12:00:46 needed for
thread 1
ORA-00289: suggestion : +DBNAME_FRA_01
ORA-00280: change 12613586221711 for thread 1 is in sequence #782

** I don't have this log in the FRA ********
ORA-00308: cannot open archived log '+DBNAME_FRA_01'
ORA-17503: ksfdopn:2 Failed to open file +DBNAME_FRA_01
ORA-15045: ASM file name '+DBNAME_FRA_01' is not in reference form
Restore the log from the backup:
RMAN> connect target /
connected to target database: DBNAME (DBID=1279696963)
RMAN> restore archivelog sequence 782 thread 1;
Starting restore at 28-FEB-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=7898 instance=DBNAME1 device type=DISK
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=782
channel ORA_DISK_1: reading from backup piece /ora_backup/u0002/DBNAME1/archivelog/
ARC_DBNAME1_20120227_222702_s1048_p1_0on4dcav
channel ORA_DISK_1: piece handle=/ora_backup/u0002/DBNAME1/archivelog/
ARC_DBNAME1_20120227_222702_s1048_p1_0on4dcav tag=TAG20120227T222741
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 28-FEB-12

Now start the recovery again.
SQL> recover datafile '+DBNAME_DATA_01/dbname/datafile/undotbs2.449.755961101'
ORA-00279: change 12613586221711 generated at 02/27/2012 22:27:23 needed for
thread 2
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1167.882.776418021
ORA-00280: change 12613586221711 for thread 2 is in sequence #1167

Specify log: {=suggested | filename | AUTO | CANCEL}
'+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1167.882.776418021'
ORA-00279: change 12613586221711 generated at 02/26/2012 12:00:46 needed for
thread 1
ORA-00289: suggestion : +DBNAME_FRA_01
ORA-00280: change 12613586221711 for thread 1 is in sequence #782

Specify log: {=suggested | filename | AUTO | CANCEL}
'+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1167.882.776418021'
ORA-00279: change 12613586221711 generated at 02/26/2012 12:00:46 needed for
thread 1
ORA-00289: suggestion : +DBNAME_FRA_01
ORA-00280: change 12613586221711 for thread 1 is in sequence #782

Specify log: {=suggested | filename | AUTO | CANCEL}
'+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_1_seq_782.866.776423291'
ORA-00279: change 12613586221719 generated at 02/27/2012 22:27:24 needed for
thread 1
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_1_seq_783.348.776418019
ORA-00280: change 12613586221719 for thread 1 is in sequence #783

Specify log: {=suggested | filename | AUTO | CANCEL}
auto *********Now all the archive logs are in the FRA so I am starting the auto recovery***
ORA-00279: change 12613586349995 generated at 02/28/2012 07:40:17 needed for
thread 1
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_1_seq_784.374.776418019
ORA-00280: change 12613586349995 for thread 1 is in sequence #784

ORA-00288: to continue recovery type ALTER DATABASE RECOVER CONTINUE
ORA-00278: log file
'+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_1_seq_784.374.776418019' no
longer needed for this recovery

ORA-00279: change 12613586350043 generated at 02/28/2012 07:40:20 needed for
thread 2
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1168.489.776418183
ORA-00280: change 12613586350043 for thread 2 is in sequence #1168

ORA-00279: change 12613586350420 generated at 02/28/2012 07:40:54 needed for
thread 1
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_1_seq_785.1231.776418929
ORA-00280: change 12613586350420 for thread 1 is in sequence #785

ORA-00279: change 12613586371543 generated at 02/28/2012 07:43:02 needed for
thread 2
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1169.431.776418183
ORA-00280: change 12613586371543 for thread 2 is in sequence #1169

ORA-00288: to continue recovery type ALTER DATABASE RECOVER CONTINUE
ORA-00278: log file
'+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1169.431.776418183' no
longer needed for this recovery

ORA-00279: change 12613586372514 generated at 02/28/2012 07:47:37 needed for
thread 2
ORA-00289: suggestion :
+DBNAME_FRA_01/dbname/archivelog/2012_02_28/thread_2_seq_1170.335.776418927
ORA-00280: change 12613586372514 for thread 2 is in sequence #1170

Log applied.
Media recovery complete.
SQL> alter database datafile '+DBNAME_DATA_01/dbname/datafile/
undotbs2.449.755961101' online;
Database altered.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: