Use RMAN to format corrupt data block which is not part of any object (Doc ID 1459778.1)

Last updated on APRIL 14, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.
*** Checked for relevance on 15-10-2014 ***
*** Checked for relevance on 07-12-2015 ***

Goal

This document describes a procedure to format a corrupt datablock using RMAN which is not part of any segment.

Typically, after a block corruption is found, we determine whether the corrupt block belongs to a table or index. If it's a index block, we can simply re-create the index. If it's a table block we can perform rman block recovery or datafile restore/recovery. If we do not have suitable backups, we salvage the table data into another table and then drop/truncate the corrupted table. So, if you have resolved the corruption using any means other then restore/recovery (or rman block media recovery), we will end up with the corrupt block which now does not belong to the original table/index i.e. it does not belong to any object.

In such situation, although the corrupt block does not belong to any object, it will still show as corrupt in DBV and you might want to format the same. For eg, say we found corruption as below:

In such situation, we can use this procedure to format the corrupt block. However, note that this procedure can ONLY be used if RMAN backup does not fail for this corrupt block. Normally we expect that RMAN will not read this block due to it's unused block optimization algorithm. However, this is not always true. RMAN reads the bitmaps stored in a locally-managed datafile header to deduce whether a particular extent is free or used. Based on how these bitmaps are managed and read by rman, its not always guaranteed that RMAN will skip all extents which are currently un-used. Some extents might still be read by rman for backups even though they are currently un-used. So we cannot be sure if RMAN will skip the extent beloging to the corrupt block or try to read it. If RMAN reads it, it will fail with error ORA-19566 due to the corrupt block which means we cannot use this procedure. Instead we'd have to use below document:

Document 336133.1 How to Format Corrupted Block Not Part of Any Segment

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms