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?






Friday, December 18, 2015

Oracle DB Table Space Corrupt affecting Entity_DAY_FACT table.

So today Oracle was made about a corruption.

Error in rollups was:
ERROR: Rollup process on baseline table errored out.: -12801: ORA-12801: error signaled in parallel query server P004 ORA-01578: ORACLE data block corrupted (file # 208, block # 1006627) ORA-01110: data file 208: '/home/oracle/app/oracle/oradata/orcl/temp2.dbf'ORA-06512: at "HYP_CCC9.ROLLUP_METRICS", line 3324 ORA-06512: at "HYP_CCC9.ROLLUP_METRICS", line 3255 


So to fix it I shutdown DM/CCC.

Then I renamed the table Entity_day_fact.

Then I made a new Table, based on the definition of the original table.

Deleted all the indexes.

Added them back to the new table.

Cleared errors in EM.

Shutdown database.
Restarted Linux host.
Started Oracle DB
Listener
EM

Then restarted CCC/DM

It is working fine again!

David