When we get a backup with Rman, if there is a damaged block on a datafile, the ORA-19566 error will be received and the backup operation will not be completed. It will generate error message as below.
ORA-19566: exceeded limit of 0 corrupt blocks for file +DATA/orcl/datafile/users.369.864669603
First, the corrupt block should be corrected. You can use the following article.
“How To Detect and Repair Block Corruption in Oracle”
If the corrupted block does not interfere with the functioning of the database, but it causes problems with the backup, the MAXCORRUPT value can be set as follows, and the backup operation can be completed successfully.
In our backup script, we set the maxcorrupt value for the corresponding datafile up to the number of corrupted blocks.
1 2 3 4 | RMAN> RUN{ SET MAXCORRUPT FOR DATAFILE 4 to 1; BACKUP DATABASE; } |
For more than one datafile the maxcorrupt can be set with one command as follows.
1 2 3 4 | RMAN> RUN{ SET MAXCORRUPT FOR DATAFILE 4,6,9 to 1; BACKUP DATABASE; } |