Skip to content

RMAN VALIDATE

    RMAN VALIDATE command is used to check for corrupt blocks and missing files, or to determine whether a backup set can be restored.

    If VALIDATE detects a problem during validation, then RMAN displays it and triggers execution of a failure assessment. If a failure is detected, then RMAN logs it into the Automated Diagnostic Repository. You can use LIST FAILURE to view the failures.

    Validating a Backup Set

    This example lists all available backup sets and then validates them. As the sample output indicates, RMAN confirms that it is possible to restore the backups.

    RMAN> LIST BACKUP SUMMARY; 
     
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    ------- -- -- - ----------- --------------- ------- ------- ---------- ---
    3871    B  F  A DISK        08-MAR-13       1       1       NO         TAG20130308T092426
    3890    B  F  A DISK        08-MAR-13       1       1       NO         TAG20130308T092534
    RMAN> VALIDATE BACKUPSET 3871, 3890;
    CopyStarting validate at 08-MAR-13
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting validation of datafile backup set
    channel ORA_DISK_1: reading from backup piece
     /disk2/PROD/backupset/2013_03_08/o1_mf_nnndf_TAG20130308T092 426_2z0kpc72_.bkp
    channel ORA_DISK_1: piece
     handle=/disk2/PROD/backupset/2013_03_08/o1_mf_nnndf_TAG20130308T092426_2z0kpc72_.bkp ta
     g=TAG20130308T092426
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: validation complete, elapsed time: 00:00:18
    channel ORA_DISK_1: starting validation of datafile backup set
    channel ORA_DISK_1: reading from backup piece
     /disk2/PROD/autobackup/2013_03_08/o1_mf_s_616670734_2z0krhjv_.bkp
    channel ORA_DISK_1: piece
     handle=/disk2/PROD/autobackup/2013_03_08/o1_mf_s_616670734_2z0krhjv_.bkp
     tag=TAG20130308T092534
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
    Finished validate at 08-MAR-13

    Validating the Database

    This example validates the database and includes sample output. The validation finds one corrupt block in data file 1. The VALIDATE output indicates that more information about the corruption can be found in the specified trace file.

    RMAN> VALIDATE DATABASE;
    
    Starting validate at 26-FEB-13
    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=/disk1/oradata/prod/system01.dbf
    input datafile file number=00002 name=/disk1/oradata/prod/sysaux01.dbf
    input datafile file number=00003 name=/disk1/oradata/prod/undotbs01.dbf
    input datafile file number=00004 name=/disk1/oradata/prod/cwmlite01.dbf
    input datafile file number=00005 name=/disk1/oradata/prod/drsys01.dbf
    input datafile file number=00006 name=/disk1/oradata/prod/example01.dbf
    input datafile file number=00007 name=/disk1/oradata/prod/indx01.dbf
    input datafile file number=00008 name=/disk1/oradata/prod/tools01.dbf
    input datafile file number=00009 name=/disk1/oradata/prod/users01.dbf
    channel ORA_DISK_1: validation complete, elapsed time: 00:01:25
    List of Datafiles
    =================
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    1    FAILED 0              4140         57600           498288
      File Name: /disk1/oradata/prod/system01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       1              41508
      Index      0              7653
      Other      0              4299
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    2    OK     0              8918         20040           498237
      File Name: /disk1/oradata/prod/sysaux01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              2473
      Index      0              2178
      Other      0              6471
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    3    OK     0              36           2560            498293
      File Name: /disk1/oradata/prod/undotbs01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              2524
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    4    OK     0              1            1280            393585
      File Name: /disk1/oradata/prod/cwmlite01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              1279
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    5    OK     0              1            1280            393644
      File Name: /disk1/oradata/prod/drsys01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              1279
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    6    OK     0              1            1280            393690
      File Name: /disk1/oradata/prod/example01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              1279
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    7    OK     0              1            1280            393722
      File Name: /disk1/oradata/prod/indx01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              1279
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    8    OK     0              1            1280            393754
      File Name: /disk1/oradata/prod/tools01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              1279
     
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    ---- ------ -------------- ------------ --------------- ----------
    9    OK     0              1272         1280            393785
      File Name: /disk1/oradata/prod/users01.dbf
      Block Type Blocks Failing Blocks Processed
      ---------- -------------- ----------------
      Data       0              0
      Index      0              0
      Other      0              8
     
    validate found one or more corrupt blocks
    See trace file /disk2/oracle/log/diag/rdbms/prod/prod/trace/prod_ora_10609.trc for details
    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              506
    Finished validate at 26-FEB-13

    Also See:

    VALIDATE

    Oracle RMAN