咨询微信: dbservice1234 7 x 24 在线支持!

RMAN Command "RESTORE ARCHIVELOG ALL VALIDATE" Failing with RMAN-06025

RMAN Command "RESTORE ARCHIVELOG ALL VALIDATE" Failing with RMAN-06025

SYMPTOMS
RMAN command 'RESTORE ARCHIVELOG ALL VALIDATE' failing with error:
 
RMAN-06025: no backup of archived log for thread number with sequence number and starting SCN of string found to restore
Cause: An archived log restore restore could not proceed because no backup of the indicated archived log was found. It may be the case that a backup of this file exists but does not satisfy the criteria specified in the user's restore operands.
Action: None - this is an informational message. See message 6026 for further details.
 
 
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/13/2012 11:38:39
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 1 seq 1 lowscn 1164241 found to restore
RMAN-06025: no backup of log thread 1 seq 58 lowscn 1164240 found to restore
RMAN-06025: no backup of log thread 1 seq 57 lowscn 1164238 found to restore
 
 
CAUSE
- The issue is caused when not using catalog database or no catalog connection is used.
 
- "ALL" keyword in "RESTORE ARCHIVELOG ALL VALIDATE" statement does not take into account backup retention policy but tries to access all archived redo logs referenced in RMAN repository
 
 
 
 
RMAN> RESTORE ARCHIVELOG ALL VALIDATE;
 
Starting restore at 13-JAN-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=32 devtype=DISK
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/13/2012 11:38:39
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 1 seq 1 lowscn 1164241 found to restore
RMAN-06025: no backup of log thread 1 seq 58 lowscn 1164240 found to restore
RMAN-06025: no backup of log thread 1 seq 57 lowscn 1164238 found to restore
RMAN-06025: no backup of log thread 1 seq 56 lowscn 1162285 found to restore
RMAN-06025: no backup of log thread 1 seq 55 lowscn 1162276 found to restore
RMAN-06025: no backup of log thread 1 seq 54 lowscn 1162274 found to restore
......
RMAN-06025: no backup of log thread 1 seq 3 lowscn 360493 found to restore
RMAN-06025: no backup of log thread 1 seq 2 lowscn 360490 found to restore
RMAN-06025: no backup of log thread 1 seq 1 lowscn 349389 found to restore
RMAN-06025: no backup of log thread 1 seq 21 lowscn 349388 found to restore
RMAN-06025: no backup of log thread 1 seq 20 lowscn 349382 found to restore
MAN-06025: no backup of
RMAN>
 
 
 
SOLUTION
Option 1:- Using only the controlfile, no catlaog database used:
 
Use the below syntax from RMAN command prompt, for validating archivelog backups.
 
 
RMAN> restore archivelog from time='<RECOVERY WINDOWS DAYS#>' validate;
 
Suppose you have set the recovery window of 7 days, then  use the below command.
 
 
RMAN> show RETENTION POLICY;
 
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
 
RMAN> restore archivelog from time='SYSDATE-7' validate;
 
Starting restore at 13-JAN-12
using channel ORA_DISK_1
 
channel ORA_DISK_1: starting validation of archive log backupset
channel ORA_DISK_1: reading from backup piece <path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T111853_7JZKG717_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=<path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T111853_7JZKG717_.BKP tag=TAG20120113T111853
channel ORA_DISK_1: validation complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting validation of archive log backupset
channel ORA_DISK_1: reading from backup piece <path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T112054_7JZKL018_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=<path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T112054_7JZKL018_.BKP tag=TAG20120113T112054
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
Finished restore at 13-JAN-12
 
RMAN>
 
 
Option2: If you have recovery catalog configured, connect to target database and recovery catalog, and  "RESTORE ARCHIVELOG ALL VALIDATE;" works without errors.
 
 
 
rman target / catalog <username>/<password>@<catalog_tns>
 
Recovery Manager: Release 10.2.0.4.0 - Production on Fri Jan 13 11:37:11 2012
 
Copyright (c) 1982, 2007, Oracle. All rights reserved.
 
connected to target database: <dbname> (DBID=<dbid>)
connected to recovery catalog database
 
RMAN> RESTORE ARCHIVELOG ALL VALIDATE;
 
Starting restore at 13-JAN-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=35 devtype=DISK
 
channel ORA_DISK_1: starting validation of archive log backupset
channel ORA_DISK_1: reading from backup piece <path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T111853_7JZKG717_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=<path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T111853_7JZKG717_.BKP tag=TAG20120113T111853
channel ORA_DISK_1: validation complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting validation of archive log backupset
channel ORA_DISK_1: reading from backup piece v\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T112054_7JZKL018_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=<path>\BACKUPSET\2012_01_13\O1_MF_ANNNN_TAG20120113T112054_7JZKL018_.BKP tag=TAG20120113T112054
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
Finished restore at 13-JAN-12
 
RMAN>