메뉴 건너뛰기

bysql.net

How to validate RMAN backup

2021.09.30 11:04

남송휘 조회 수:113

How to validate RMAN backup

The main purpose is to check for corrupt blocks and missing files.

There are two types of corruptions
1. Physical corruption
2. Logical corruption

In physical corruption/media corruption, the database does not recognize the block at all and the checksum is invalid.

In a logical corruption, the contents of the block are logically inconsistent. By default RMAN doesn’t check for logical corruption. Use “CHECK LOGICAL” with BACKUP or RESTORE command to check for logical and physical corruption using RMAN.

It’s advised to set DB_BLOCK_CHECKSUM=typical in the initialization parameter file of a database, set so that the database calculates datafile checksums automatically (not for backups). The BACKUP command computes checksum for each block and stores it in the backup. If you specify NOCHECKSUM while creating backup then RMAN does not perform a checksum of the blocks.

Note that Automatic Diagnostic Repository (ADR) tracks all types of corruptions.

VALIDATE:-
Run below command to validate Database
RMAN> VALIDATE DATABASE;

Run below command to validate Backup set
RMAN> VALIDATE BACKUPSET 10;

Run below command to validate individual data blocks within a data file for block corruption
RMAN> VALIDATE DATAFILE 1 BLOCK 10;

Click here for Block recovery using RMAN.

BACKUP VALIDATE:-
Use BACKUP VALIDATE to check datafile logical/physical corruptions and check all database files exists in correct location. Do not use the BACKUPSET, MAXCORRUPT, or PROXY parameters with BACKUP VALIDATE.

Run below command to validate all database files and archived logs. This command checks for physical corruptions only.
RMAN> BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

Run below command to check for logical corruptions and physical corruptions.
RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;

Click here to Validate restore using RMAN.

Regards,
Satishbabu Gunukula
http://www.oracleracexpert.com/

https://www.oracleracexpert.com/2009/08/how-to-validate-rman-backup.html