Thursday, May 22, 2008

Allow Recovery to Corrupt Blocks

Whenever during recovery database finds corrupt block then recovery will automatically stops. In order to do recovery with skipping corrupt blocks run the RECOVER command with the ALLOW n CORRUPTION clause, where n is the number of allowable corrupt blocks.

Then database will allow recovery and mark the problem block as corrupt. However it should not do if problem block is is under SYSTEM tablespace.

In order to allow a single corruption just enter,

SQL>RECOVER DATABASE ALLOW 1 CORRUPTION;

Whenever there is a problem in corrupt block then the object id will be recorded inside alert log file. You can usually query the database to find out which object or table owns this block. To do so, cancel recovery and open the database read only.

CANCEL
SQL>ALTER DATABASE OPEN READ ONLY;


Now determine the object name by getting data object id from alert log. Suppose is it 1230
SELECT OWNER, OBJECT_NAME, SUBOBJECT_NAME, OBJECT_TYPE
FROM DBA_OBJECTS
WHERE DATA_OBJECT_ID =1230;


Now you should perform trial recovery RECOVER ... TEST and see whether problem is isolated or not. If it is not isolated and if it is isolated but not contain SYSTEM data blocks then you can open the database with RESETLOGS options.

Related Documents:
-------------------------------

Block Media Recovery with RMAN

Extract data from corrupt block

Verify Physical data Structure

No comments:

Post a Comment