The validate command can be used to detect corrupt blocks and missing files,
also to determine whether backup set can be restored.

The validate command can check for physical and logical corruptions in database files.

The following command will validate and check all datafiles along with archivelogs,
current controlfile and spfile for any kind of corruption.


RMAN> validate database plus archivelog;

Code:
Starting validate at 26-JAN-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=4 RECID=1 STAMP=773576110
input archived log thread=1 sequence=5 RECID=2 STAMP=773576128
input archived log thread=1 sequence=6 RECID=3 STAMP=773576135
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    4       OK     0              12205           /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_4_7l1pl7xp_.arc

1    5       OK     0              230             /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_5_7l1pm8n1_.arc

1    6       OK     0              3               /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_6_7l1pmgnt_.arc
Finished validate at 26-JAN-12

Starting validate at 26-JAN-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:02:38
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              12494        85766           807619    
  File Name: /u01/app/oracle/oradata/orcl/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              58280           
  Index      0              12223           
  Other      0              2763            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              18591        61501           807617    
  File Name: /u01/app/oracle/oradata/orcl/sysaux01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              10450           
  Index      0              7606            
  Other      0              24793           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              781          7680            807619    
  File Name: /u01/app/oracle/oradata/orcl/undotbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              6899            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              255          640             785461    
  File Name: /u01/app/oracle/oradata/orcl/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              91              
  Index      0              39              
  Other      0              255             

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              1738         12803           775084    
  File Name: /u01/app/oracle/oradata/orcl/example01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              4410            
  Index      0              1262            
  Other      0              5390            

channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current control file for validation
including current SPFILE in backup set
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Control File OK     0              594             
Finished validate at 26-JAN-12
The following command will validate all recovery files on disk.

Recovery Files Include

1) Full and Incremental Backup sets.
2) Control file autobackups.
3) archived redo logs.
4) datafiles copies.



RMAN> validate recovery files;

Code:
Starting validate at 26-JAN-12
using channel ORA_DISK_1
specification does not match any datafile copy in the repository
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=4 RECID=1 STAMP=773576110
input archived log thread=1 sequence=5 RECID=2 STAMP=773576128
input archived log thread=1 sequence=6 RECID=3 STAMP=773576135
input archived log thread=1 sequence=7 RECID=4 STAMP=773576567
input archived log thread=1 sequence=8 RECID=5 STAMP=773576722
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    4       OK     0              12205           /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_4_7l1pl7xp_.arc

1    5       OK     0              230             /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_5_7l1pm8n1_.arc

1    6       OK     0              3               /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_6_7l1pmgnt_.arc

1    7       OK     0              836             /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_7_7l1q0z4x_.arc

1    8       OK     0              35              /u01/app/oracle/flash_recovery_area
                                                   /ORCL/archivelog/2012_01_26
                                                   /o1_mf_1_8_7l1q5t5j_.arc

channel ORA_DISK_1: input backup set: count=5, stamp=773576567, piece=1
channel ORA_DISK_1: starting piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_26
/o1_mf_annnn_TAG20120126T102247_7l1q107w_.bkp piece handle=/u01/app/oracle/flash_recovery_area
/ORCL/backupset/2012_01_26/o1_mf_annnn_TAG20120126T102247_7l1q7bfc_.bkp comment=NONE

channel ORA_DISK_1: finished piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
channel ORA_DISK_1: input backup set: count=6, stamp=773576570, piece=1
channel ORA_DISK_1: starting piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_26
/o1_mf_nnndf_TAG20120126T102249_7l1q1395_.bkp piece handle=/u01/app/oracle/flash_recovery_area
/ORCL/backupset/2012_01_26/o1_mf_nnndf_TAG20120126T102249_7l1q7cpy_.bkp comment=NONE

channel ORA_DISK_1: finished piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece complete, elapsed time: 00:01:39
channel ORA_DISK_1: input backup set: count=7, stamp=773576715, piece=1
channel ORA_DISK_1: starting piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_26
/o1_mf_ncsnf_TAG20120126T102249_7l1q5pk4_.bkp piece handle=/u01/app/oracle/flash_recovery_area
/ORCL/backupset/2012_01_26/o1_mf_ncsnf_TAG20120126T102249_7l1qbh0t_.bkp comment=NONE

channel ORA_DISK_1: finished piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:04
channel ORA_DISK_1: input backup set: count=8, stamp=773576722, piece=1
channel ORA_DISK_1: starting piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_26
/o1_mf_annnn_TAG20120126T102522_7l1q5tsy_.bkp piece handle=/u01/app/oracle/flash_recovery_area
/ORCL/backupset/2012_01_26/o1_mf_annnn_TAG20120126T102522_7l1qblb2_.bkp comment=NONE

channel ORA_DISK_1: finished piece 1 at 26-JAN-12
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
Finished validate at 26-JAN-12