Every disk has a three copy of block header, located in blocks number 0, 510, 2816. And when you using command “kfed repair”, the command replaces the original block with the reserved block.
Today I’ve stumbled upon on ORA-15196: invalid ASM block header during making backup through RMAN.
Look back upon this month I remembered that, I was successfully modified datafile header through BBED, but didn’t write about it at all. And I figured out, it is isn’t right, because when I will need to use it again I will have to struggle to remember.
Some time ago, I helped to migrate Oralce database from Windows platform to Linux platform. During migration was happened some strange situation. When RMAN finished his “convert datafile” work, controlfile wasn’t created successfully, stumbled upon an error ORA-01161. Off course I used “SET DATABASE” when was try to create controlfile. And what is more interesting all files was successfully updated their headers except only one file.
Bellow I’m described how we can modify data in the header.
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