Pages

Wednesday, 24 January 2018

ORA-19566: exceeded limit of 0 corrupt blocks

During full backup operation We noticed that RMAN log mention below error message at backup log file.

RMAN-03009: failure of backup command on ch01 channel at 01/24/2018 20:05:49
ORA-19566: exceeded limit of 0 corrupt blocks for file xxxxxxxxxxxxxxxxxxxxxx

Get the Datafile id and block id using below.

select * from v$database_block_corruption;

select 'Validate datafile '|| file# || ' block '||block# ||';' FROM v$database_block_corrupt;

Validate using rman:

Validate datafile <file no> block <Block no> ;

RMAN> VALIDATE DATAFILE 1;
RMAN> VALIDATE DATAFILE '/u01/app/oracle/oradata/xxxx/xxxxxxxxxx.dbf';

RMAN> VALIDATE CHECK LOGICAL DATAFILE 1;
RMAN> VALIDATE CHECK LOGICAL DATAFILE '/u01/app/oracle/oradata/xxxxxx/xxxxxxx.dbf';

RMAN> VALIDATE TABLESPACE users;
RMAN> VALIDATE CHECK LOGICAL TABLESPACE users;

RMAN> VALIDATE DATABASE;

RMAN> VALIDATE CHECK LOGICAL DATABASE;

See what type of object is corrupted.

select * from v$database_block_corruption;

select segment_name,owner,segment_type from dba_extents
     where file_id=xx
     and xxxxxxx between block_id and block_id + blocks -1; 

SEGMENT_NAME              OWNER      SEGMENT_TYPE
------------------------- ---------- ------------------
xxxxxxxx       SYS        INDEX PARTITION

Either you can ignore the corruption based on the object type or we can perform recovery.
Ignoring the corruption:

run
{
ALLOCATE CHANNEL ch1 TYPE DISK;
set maxcorrupt for datafile xx to xx;
RELEASE CHANNEL ch1;
}

Performing recovery :

Rman> run { 
allocate channel c1 device type disk ;
allocate channel c2 device type disk ; 
blockrecover corruption list ; 
}

Or Alternate command is

Rman>recover corruption list ;

While recover corruption list in process, dynamic view v$database_block_corruption will be updated. 
But We see that after rman complete process this view still show us there are corruption block avaliable.
So validate using rman

rman target / nocatalog
RMAN> Validate datafile xx block xxxxxxxx;

Now check corruption list

select * from v$database_block_corruption;

No comments:

Post a Comment