RMAN Validate Command

Database files can be validated using the RMAN VALIDATE statement

To validate an entire database use:

VALIDATE DATABASE;

For example:

RMAN> VALIDATE DATABASE;

Starting validate at 23-SEP-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 device type=DISK
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/oradata/TEST/system01.dbf
input datafile file number=00002 name=/u01/app/oradata/TEST/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oradata/TEST/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oradata/TEST/users01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:45
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              15399        93442           4464162
  File Name: /u01/app/oradata/TEST/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              62215
  Index      0              13060
  Other      0              2766

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              22615        87042           4464038
  File Name: /u01/app/oradata/TEST/sysaux01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              19664
  Index      0              16520
  Other      0              28241

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              33           19200           4464161
  File Name: /u01/app/oradata/TEST/undotbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0
  Index      0              0
  Other      0              19167

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              1292         3846            4088662
  File Name: /u01/app/oradata/TEST/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1228
  Index      0              383
  Other      0              937

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              604
Finished validate at 23-SEP-15

To validate an individual datafile use VALIDATE DATAFILE:

For example:

RMAN> VALIDATE DATAFILE '/u01/app/oradata/TEST/users01.dbf';

Starting validate at 23-SEP-15
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=00004 name=/u01/app/oradata/TEST/users01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              1292         3846            4088662
  File Name: /u01/app/oradata/TEST/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1228
  Index      0              383
  Other      0              937

Finished validate at 23-SEP-15

Altermatively specify the data file number. For example:

RMAN> VALIDATE DATAFILE 4;

Starting validate at 23-SEP-15
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=00004 name=/u01/app/oradata/TEST/users01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              1292         3846            4088662
  File Name: /u01/app/oradata/TEST/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1228
  Index      0              383
  Other      0              937

Finished validate at 23-SEP-15

The data file number can be obtained from V$DATAFILE. For example:

SELECT file#, name FROM v$datafile;