Basic Concepts of Block Media Recovery
Usually, the database marks a block as media corrupt and then writes it to disk when the corruption is first encountered. No subsequent read of the block is successful until the block is recovered. You can perform block recovery only on blocks that are marked corrupt or that fail a corruption check.
If the database on which the corruption occurs is associated with a real-time query physical standby database, then the database automatically attempts to perform block media recovery. The primary database searches for good copies of blocks on the standby database and, if they are found, repairs the blocks with no impact to the query that encountered the corrupt block. The Oracle Database physical block corruption message (
ORA-1578) is displayed only if the database cannot repair the corruption.
Whenever block corruption has been automatically detected, you can perform block media recovery manually with the
RECOVER ... BLOCK command. By default, RMAN first searches for good blocks in the real-time query physical standby database, then flashback logs and then blocks in full or level 0 incremental backups.
For block media recovery to work automatically, the physical standby database must be in real-time query mode. An Oracle Active Data Guard license is required.
If a corrupt data block is discovered on a real-time query physical standby database, the server attempts to repair the corruption by obtaining a copy of the block from the primary database. The repair is performed in the background, enabling subsequent queries to succeed if the repair is successful. Automatic block repair is attempted if the following database initialization parameters are configured on the standby database as described:
LOG_ARCHIVE_CONFIGparameter is configured with a
DG_CONFIGlist and a
LOG_ARCHIVE_DEST_nparameter is configured for the primary database with the