Total Pageviews

Friday, 1 April 2016

RMAN RESTORE ISSUE....



"File 1 was not restored from a sufficiently old backup" in RMAN Recover

RMAN> recover database;

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/package/oracle/oradata/perseus/system01.dbf'

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/15/2012 11:09:12
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of archived log for thread 1 with sequence 41765 and starting SCN of 9738413586917 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41764 and starting SCN of 9738413585738 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41763 and starting SCN of 9738413584155 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41762 and starting SCN of 9738413582950 found to restore
...

RMAN-06025: no backup of archived log for thread 1 with sequence 41734 and starting SCN of 9738413520883 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41733 and starting SCN of 9738413519245 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41732 and starting SCN of 9738413518015 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 41731 and starting SCN of 9738413516741 found to restore

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 02/15/2012 11:28:44
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/package/oracle/oradata/perseus/system01.dbf'

RMAN> list backup of archivelog all;

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
16198481 73.00K     DISK        00:00:00     11-FEB-12     
        BP Key: 16198488   Status: AVAILABLE  Compressed: YES  Tag: SAT
        Piece Name: /package/oracle/orabackup/rman/rman_PERSEUS_arc_20120211_4644_1

  List of Archived Logs in backup set 16198481
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    41584   9738413221153 11-FEB-12 9738413222321 11-FEB-12
...

  1    41724   9738413502482 12-FEB-12 9738413503782 12-FEB-12
  1    41725   9738413503782 12-FEB-12 9738413505258 12-FEB-12
  1    41726   9738413505258 12-FEB-12 9738413509317 12-FEB-12
  1    41727   9738413509317 12-FEB-12 9738413513782 12-FEB-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
16205673 11.50K     DISK        00:00:01     12-FEB-12     
        BP Key: 16205679   Status: AVAILABLE  Compressed: YES  Tag: SUN
        Piece Name: /package/oracle/orabackup/rman/rman_PERSEUS_arc_20120212_4653_1

  List of Archived Logs in backup set 16205673
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    41730   9738413516668 12-FEB-12 9738413516741 12-FEB-12

RMAN> recover database until sequence 41730;

Starting recover at 15-FEB-12
using channel ORA_DISK_1
using channel ORA_DISK_2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/15/2012 11:38:42
RMAN-06556: datafile 1 must be restored from backup older than SCN 9738413516668

Need to tell RMAN when to stop.
RMAN>  recover database until sequence 41731;

Starting recover at 15-FEB-12
using channel ORA_DISK_1
using channel ORA_DISK_2

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=41730
channel ORA_DISK_1: reading from backup piece /package/oracle/orabackup/rman/rman_PERSEUS_arc_20120212_4653_1
channel ORA_DISK_1: piece handle=/package/oracle/orabackup/rman/rman_PERSEUS_arc_20120212_4653_1 tag=SUN
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/oradb/archive/perseus/archive1_41730_729171422.dbf thread=1 sequence=41730
media recovery complete, elapsed time: 00:00:01
Finished recover at 15-FEB-12

RMAN> alter database open resetlogs;

database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete



 SET UNTIL SEQUENCE 41668;
  RECOVER DATABASE ;




Reference:--
https://blogs.warwick.ac.uk/java/entry/rman_backup/

https://oracleracdba1.wordpress.com/2013/08/25/rman-recovery-if-the-missing-archive-logs-are-required-for-recovery/

https://www.veritas.com/support/en_US/article.TECH76121

No comments :

Post a Comment