The VALIDATE option of the BACKUP command in RMAN allows you to verify that database files exist, are in the correct locations, and are free from physical or logical corruption that would prevent RMAN from backing them up. When you execute a BACKUP... VALIDATE command, RMAN reads the specified files in their entirety as it would during an actual backup, but it does not create backup sets or image copies.
If RMAN identifies any corrupt blocks during the validation, it records this information in the V$DATABASE_BLOCK_CORRUPTION view, with details about the corrupted blocks. You can address these corruptions using block media recovery, as explained in the Oracle Database Backup and Recovery Advanced User's Guide. Once the corrupt block is repaired, the corresponding entry in the view is removed.
Basic Concepts of RMAN Validation
The database prevents operations that result in unusable backup files or corrupted restored datafiles. The database automatically does the following:
- Blocks access to datafiles while they are being restored or recovered
- Permits only one restore operation for each datafile at a time
- Ensures that incremental backups are applied in the correct order
- Stores information in backup files to allow detection of corruption
- Checks a block every time it is read or written in an attempt to report a corruption as soon as it has been detected.
RMAN (BACKUP VALIDATE, RESTORE VALIDATE, VALIDATE)
To validate an entire database :
RMAN> VALIDATE DATABASE;
Starting validate at 23-DEC-24
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 4474162
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 4484038
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 4474161
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
---- ------ -------------- ------------ --------------- ----------
OK 0 1292 3846 4688662
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-DEC-24
No comments:
Post a Comment