Monday, December 21, 2015

Data Block Corrupt - database offline!

How to get the DB back up:
1.  login as sysdba
2. shutdown immediate;
3. startup;

How to find the table or index with the problem:
1. type the file.trc thru GREP
    cat orcl_pmon_4543.trc|grep 'data block corrupted'

Results:
  • ORA-01578: ORACLE data block corrupted (file # 6, block # 208825)
  • ORA-01578: ORACLE data block corrupted (file # 6, block # 208825)
Use this query:
select owner, segment_type, segment_name
from dba_extents
where file_id=6
  and 208825
  between block_id and block_id+blocks-1;
Results:

OWNER SEGMENT_TYPE SEGMENT_NAME
HYP_CCC9 INDEX PARTITION SERVER_FACT_ENTITY_ID_IDX

How to find the DB filename:
 cat orcl_pmon_4543.trc|grep 'data file'

Results:

ORA-01110: data file 6: '/home/oracle/app/oracle/oradata/orcl/HYP_DM9_IDX_3.dbf'
ORA-01110: data file 6: '/home/oracle/app/oracle/oradata/orcl/HYP_DM9_IDX_3.dbf'



How to fix this:
1.  Idea, rename the bad index and create a new one?






No comments:

Post a Comment