11g版本的修复(之前的文档),可以参考(46条消息) 一次备库的坏块的修复过程_restore library built sep 1 2022 at 01:16:49_文档搬运工的博客-CSDN博客
参考文档:
Data Guard Concepts and Administration
10.2.1.5 Automatic Block Media Recovery
10.2.1.5 Automatic Block Media Recovery
If corrupt data blocks are encountered when a database is accessed, they can be automatically replaced with uncorrupted copies of those blocks.
This requires the following conditions:
The physical standby database must be operating in real-time query mode, which requires an Oracle Active Data Guard license.
The physical standby database must be running real-time apply.
Automatic block media recovery works in two directions depending on whether the corrupted blocks are encountered on the primary or on the standby.
Corrupted Blocks On the Primary
If corrupt data blocks are encountered at a primary database, then the primary automatically searches for good copies of those blocks on a standby and, if they are found, has them shipped back to the primary.
The primary requires a LOG_ARCHIVE_DEST_
n
to the standby only (a physical standby, a cascading physical standby, or a far sync instance). The primary does not require a LOG_ARCHIVE_DEST_
n
to any terminal destinations; it is able to automatically ascertain their service names.
Corrupted Blocks On a Standby
If corrupt data blocks are encountered at a standby, then the standby automatically initiates communication with the primary and requests uncorrupted copies of those blocks. For the primary to be able to ship the uncorrupted blocks to the standby, the following database initialization parameters must be configured on the standby. This is true even if the primary does not directly service the standby (for example, in cascading configurations).
The LOG_ARCHIVE_CONFIG
parameter is configured with a DG_CONFIG
list and a LOG_ARCHIVE_DEST_
n
parameter is configured for the primary database.
or
The FAL_SERVER
parameter is configured and its value contains an Oracle Net service name for the primary database.
Additional Automatic Block Media Repair Considerations
Automatic repair is supported with any Oracle Data Guard protection mode. However, the effectiveness of repairing a corrupt block at the primary using the non-corrupt version of the block from the standby depends on how closely the standby apply is synchronized with the redo generated by the primary.
When an automatic block repair has been performed, a message is written to the database alert log.
If automatic block repair is not possible, an ORA-1578
error is returned.
10.2.1.6 Manual Block Media Recovery
The RMAN RECOVER BLOCK
command is used to manually repair a corrupted data block.
This command searches several locations for an uncorrupted copy of the data block. By default, one of the locations is any available physical standby database operating in real-time query mode. The EXCLUDE STANDBY
option of the RMAN RECOVER BLOCK
command can be used to exclude physical standby databases as a source for replacement blocks.
See Also:
Oracle Database Backup and Recovery Reference for more information about the RMAN RECOVER BLOCK
command
END