Showing posts with label Block Corruption in Datafile. Show all posts
Showing posts with label Block Corruption in Datafile. Show all posts

Saturday, December 27, 2008

Block Corruption in Datafile

You can find such an entry in Alertlog as below.

Corrupt block relative dba: 0x08c00e60 (file 42, block 4258)
Bad header found during backing up datafile
Data in bad block -
type: 6 format: 2 rdba: 0x09000e60
last change scn: 0x058c.c60f01b6 seq: 0x1 flg: 0x02
consistency value in tail: 0x01b60601
check value in block header: 0x0, block checksum disabled
spare1: 0x0, spare2: 0x0, spare3: 0x0

***************

Reread of blocknum=4258, file=/disk1/db123_data/oradata/db123/dbfiles/TblSp6_data1.dbf. found same corrupt data
Mon Dec 15 23:26:59 2008

After this I found corrupted block and segment name which is following

SQL> SELECT tablespace_name, segment_type, owner, segment_name FROM dba_extents WHERE file_id = 42 and 4258 between block_id AND block_id + blocks - 1;

TABLESPACE_NAME SEGMENT_TYPE OWNER SEGMENT_NAME
-------------------------- -------------------- ------------ ----------------------
TBLSP6_DATA1 TABLE USER3 ALL_PAGES

SQL> select count(*) from USER3.ALL_PAGES;

select count(*) from USER3.ALL_PAGES
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 42, block # 4258)
ORA-01110: data file 42:
'/disk1/db123_data/oradata/db123/dbfiles/TBLSP6_DATA1.dbf'

*************
Solutin :

Offline the datafile move the existing datafile to other name and copy the old good datafile from backup and recover the datafile.