ORA-01578

ORA-01578: ORACLE data block corrupted (file # 8, block # 2020) ORA-01110

First find out database object is in that corrupt block. Use the following query:

SELECT owner,segment_name,segment_type 
FROM dba_extents
WHERE file_id=6 and 1856 BETWEEN block_id AND block_id+blocks;


There are two methods that you can use to recover !

   You define block is corrupted belong to which object by script:

        select 
        a.owner, 
        a.segment_name, 
        a.segment_type, 
        b.tablespace_name
     from 
        dba_extents a, 
        dba_data_files b
     where 
        a.file_id = b. file_id
        and b.relative_fno = 8     
        and 
        2020 between a.block_id AND a.block_id + a.blocks - 1;

   1. You have a backup of database ? 

    You use bellow commands to view errors and suggestion that oracle provide:

    RMAN> LIST FAILURE;         ---> Show all of errors
    RMAN> ADVISE FAILURE;   ---> Show advices that Oracle gave.
    RMAN> REPAIR FAILURE PREVIEW;   ---> View content of script that Oracle gave to recover block is corrupted.
    RMAN> REPAIR FAILURE NOPROMPT;   ---> Run script that Oracle gave.

   You can run script:

   run{
          allocate channel rman_bk_ch01 type disk format '...';     --> Location that contains your backups
          blockrecover corruption list;
   };

   or

   run{
          allocate channel rman_bk_ch01 type disk format '...';          
          blockrecover datafile 8 block 2020;
          release channel rman_bk_ch01;
   };

   2. You can use DBMS_REPAIR to repair block that correupted.

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...