File 1 block 128 corrupted/bad blocks recovery-system rollback bad block repair in Oracle

Source: Internet
Author: User
Tags dba reserved rollback

There is a database file 1 block 128 bad blocks causing the database to fail to start the error follows




The database version is 11.2.0.1, and according to our experience the block is the segment header of system rollback, following for my query results in normal crying


Sql> Select File_id,block_id,blocks from dba_extents where segment_name= ' SYSTEM '





file_id block_id BLOCKS


---------- ---------- ----------


1 128 8


1 136 8


1 528 8


1 536 8


1 544 8


1 552 8





6 rows selected.


Dump file 1 Block 128 result


Dump all blocks in range:


Buffer tsn:0 rdba:0x00400080 (1/128)


scn:0x0000.00000000 Seq:0xff flg:0x04 Tail:0x00000eff


frmt:0x02 chkval:0x1387 type:0x0e=ktu UNDO HEADER w/unlimited extents


Hex dump of Block:st=0, typ_found=1


Here you can see that the block SCN is 0x0000.00000000 and the data blocks have been marked as bad blocks


DBV Check for bad block results











From here you can see that the main error is due to controlscn:0x0004.119fe191 greater than blockscn:0x0000.00000000, copy system files to local, use bbed Modify

bbed Fix Bad Blocks


h:\temp\system01>bbed Password=blockedit filename=system01.dbf blocksize=8192





Bbed:release 2.0.0.0.0-limited Production on Thu Mar 17 00:23:49 2016





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.





************* !!! For Oracle Internal with only!!! ***************





Bbed> Show All


file# 0


block# 1


OFFSET 0


DBA 0x00000000 (0 0,1)


FILENAME system01.dbf


Bifile BIFILE.BBD


ListFile


BLOCKSIZE 8192


MODE Browse


EDIT Unrecoverable


IBase Dec


Obase Dec


WIDTH 80


COUNT 512


LOGFILE LOG.BBD


SPOOL No





Bbed> Set block 129


block# 129





Bbed> Map


FILE:SYSTEM01.DBF (0)


block:129 dba:0x00000000


------------------------------------------------------------


Unlimited Undo Segment Header





struct KCBH, Bytes @0





struct Ktech, Bytes @20





struct KTEMH, Bytes @92





struct ktetb[6], bytes @108





struct KTUXC, Bytes @4148





struct ktuxe[204], 8160 bytes @4252





UB4 Tailchk @8188








Bbed> P KCBH


struct KCBH, Bytes @0


Ub1 TYPE_KCBH @0 0x0e


Ub1 FRMT_KCBH @1 0xa2


Ub1 SPARE1_KCBH @2 0x00


Ub1 SPARE2_KCBH @3 0x00


UB4 RDBA_KCBH @4 0x00400080


UB4 BAS_KCBH @8 0x00000000


UB2 WRP_KCBH @12 0x0000


Ub1 SEQ_KCBH @14 0xFF


Ub1 FLG_KCBH @15 0x04 (KCBHFCKV)


UB2 CHKVAL_KCBH @16 0x1387


UB2 SPARE3_KCBH @18 0x0000





Bbed> Set Mode Edit


MODE Edit





Bbed> D offset 8188


FILE:SYSTEM01.DBF (0)


block:129 offsets:8188 to 8191 dba:0x00000000


------------------------------------------------------------------------


ff0e0000





<32 bytes= "per=" "line=" ">





bbed> m/x Offset 8188


FILE:SYSTEM01.DBF (0)


block:129 offsets:8188 to 8191 dba:0x00000000


------------------------------------------------------------------------


010e0000





<32 bytes= "per=" "line=" ">





Bbed> Verify


Dbverify-verification starting


FILE = system01.dbf


block = 128








Dbverify-verification Complete





Total Blocks examined:1


Total Blocks processed (Data): 0


Total Blocks Failing (Data): 0


Total Blocks processed (Index): 0


Total Blocks Failing (Index): 0


Total Blocks empty:0


Total Blocks Marked corrupt:0


Total Blocks influx:0





bbed> sum apply


Check value for File 0, block 129:


Current = 0x1387, required = 0x1387





Bbed> Verify


Dbverify-verification starting


FILE = system01.dbf


block = 128








Dbverify-verification Complete





Total Blocks examined:1


Total Blocks processed (Data): 0


Total Blocks Failing (Data): 0


Total Blocks processed (Index): 0


Total Blocks Failing (Index): 0


Total Blocks empty:0


Total Blocks Marked corrupt:0


Total Blocks influx:0





Bbed> exit








H:\TEMP\SYSTEM01>DBV file=system01. Dbf





Dbverify:release 12.1.0.2.0-production on Thursday March 17 00:26:26 2016





Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.





Dbverify-Start Validation: FILE = H:\TEMP\SYSTEM01\SYSTEM01. Dbf


controlscn:0x0004.119fe191 Greater than blockscn:0x0000.00000000


Page 128 failed with a checksum code of 14509


Page 128 failed with a checksum code of 14509








Dbverify-Verification Complete





Total pages Checked: 209920


Total pages processed (data): 132380


Total number of pages failed (data): 0


Total pages processed (index): 57168


Total number of pages failed (index): 0


Total pages processed (other): 3112


Total number of pages processed (paragraph): 1


Total number of failed pages (segments): 1


Total number of empty pages: 17260


Total number of pages marked as corrupted: 1


Total pages flowing: 0


Total number of encrypted pages: 0


Top Block scn:188826853 (5.188826853)








h:\temp\system01>bbed Password=blockedit filename=system01.dbf





Bbed:release 2.0.0.0.0-limited Production on Thu Mar 17 00:26:59 2016





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.





************* !!! For Oracle Internal with only!!! ***************








Bbed> Set BlockSize 8192


BLOCKSIZE 8192





Bbed> Set block 129


block# 129





Bbed> Verify


Dbverify-verification starting


FILE = system01.dbf


block = 128








Dbverify-verification Complete





Total Blocks examined:1


Total Blocks processed (Data): 0


Total Blocks Failing (Data): 0


Total Blocks processed (Index): 0


Total Blocks Failing (Index): 0


Total Blocks empty:0


Total Blocks Marked corrupt:0


Total Blocks influx:0








Bbed> Map


FILE:SYSTEM01.DBF (0)


block:129 dba:0x00000000


------------------------------------------------------------


Unlimited Undo Segment Header





struct KCBH, Bytes @0





struct Ktech, Bytes @20





struct KTEMH, Bytes @92





struct ktetb[6], bytes @108





struct KTUXC, Bytes @4148





struct ktuxe[204], 8160 bytes @4252





UB4 Tailchk @8188








Bbed> P KCBH


struct KCBH, Bytes @0


Ub1 TYPE_KCBH @0 0x0e


Ub1 FRMT_KCBH @1 0xa2


Ub1 SPARE1_KCBH @2 0x00


Ub1 SPARE2_KCBH @3 0x00


UB4 RDBA_KCBH @4 0x00400080


UB4 BAS_KCBH @8 0x00000000


UB2 WRP_KCBH @12 0x0000


Ub1 SEQ_KCBH @14 0x01


Ub1 FLG_KCBH @15 0x04 (KCBHFCKV)


UB2 CHKVAL_KCBH @16 0x1387


UB2 SPARE3_KCBH @18 0x0000








Bbed> Set Mode Edit


MODE Edit





bbed> m/x 0400 Offset 12


FILE:SYSTEM01.DBF (0)


block:129 Offsets:12 to 523 dba:0x00000000


------------------------------------------------------------------------


04000104 87130000 00000000 00000000 00000000 00000000 06000000 2f000000


20100000 05000000 05000000 08000000 2d024000 00000000 05000000 00000000


00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000040


81004000 07000000 88004000 08000000 10024000 08000000 18024000 08000000


20024000 08000000 28024000 08000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000





<32 bytes= "per=" "line=" ">





Bbed> P KCBH


struct KCBH, Bytes @0


Ub1 TYPE_KCBH @0 0x0e


Ub1 FRMT_KCBH @1 0xa2


Ub1 SPARE1_KCBH @2 0x00


Ub1 SPARE2_KCBH @3 0x00


UB4 RDBA_KCBH @4 0x00400080


UB4 BAS_KCBH @8 0x00000000


UB2 WRP_KCBH @12 0x0004


Ub1 SEQ_KCBH @14 0x01


Ub1 FLG_KCBH @15 0x04 (KCBHFCKV)


UB2 CHKVAL_KCBH @16 0x1387


UB2 SPARE3_KCBH @18 0x0000





bbed> m/x 625a60d0 Offset 8


FILE:SYSTEM01.DBF (0)


block:129 Offsets:8 to 519 dba:0x00000000


------------------------------------------------------------------------


625a60d0 10000104 87130000 00000000 00000000 00000000 00000000 06000000


2f000000 20100000 05000000 05000000 08000000 2d024000 00000000 05000000


00000000 00000000 00000000 00000000 00000000 06000000 00000000 00000000


00000040 81004000 07000000 88004000 08000000 10024000 08000000 18024000


08000000 20024000 08000000 28024000 08000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000





<32 bytes= "per=" "line=" ">





Bbed> P KCBH


struct KCBH, Bytes @0


Ub1 TYPE_KCBH @0 0x0e


Ub1 FRMT_KCBH @1 0xa2


Ub1 SPARE1_KCBH @2 0x00


Ub1 SPARE2_KCBH @3 0x00


UB4 RDBA_KCBH @4 0x00400080


UB4 BAS_KCBH @8 0xd0605a62


UB2 WRP_KCBH @12 0x0010


Ub1 SEQ_KCBH @14 0x01


Ub1 FLG_KCBH @15 0x04 (KCBHFCKV)


UB2 CHKVAL_KCBH @16 0x1387


UB2 SPARE3_KCBH @18 0x0000





Bbed> D offset 8188


FILE:SYSTEM01.DBF (0)


block:129 offsets:8188 to 8191 dba:0x00000000


------------------------------------------------------------------------


010e0000





<32 bytes= "per=" "line=" ">





Bbed> m/x 010e625a


FILE:SYSTEM01.DBF (0)


block:129 offsets:8188 to 8191 dba:0x00000000


------------------------------------------------------------------------


010e625a





<32 bytes= "per=" "line=" ">





Bbed> Verify


Dbverify-verification starting


FILE = system01.dbf


block = 128





Block 128 is corrupt


***


Corrupt block relative dba:0x00400080 (file 0, block 128)


Bad check value found during verification


Data in bad block-


Type:14 Format:2 rdba:0x00400080


Last Change scn:0x0010.34605a62 seq:0x1 flg:0x04


Consistency value in TAIL:0X5A620E01


Check value in blocks header:0x1387, computed block checksum:0x3470


spare1:0x0, spare2:0x0, spare3:0x0


***








Dbverify-verification Complete





Total Blocks examined:1


Total Blocks processed (Data): 0


Total Blocks Failing (Data): 0


Total Blocks processed (Index): 0


Total Blocks Failing (Index): 0


Total Blocks empty:0


Total Blocks Marked corrupt:1


Total Blocks influx:0





bbed> sum apply


Check value for File 0, block 129:


Current = 0x27f7, required = 0x27f7





Bbed> Verify


Dbverify-verification starting


FILE = system01.dbf


block = 128








Dbverify-verification Complete





Total Blocks examined:1


Total Blocks processed (Data): 0


Total Blocks Failing (Data): 0


Total Blocks processed (Index): 0


Total Blocks Failing (Index): 0


Total Blocks empty:0


Total Blocks Marked corrupt:0


Total Blocks influx:0





Bbed> exit








H:\TEMP\SYSTEM01>DBV file=system01. Dbf





Dbverify:release 12.1.0.2.0-production on Thursday March 17 00:40:38 2016





Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.





Dbverify-Start Validation: FILE = H:\TEMP\SYSTEM01\SYSTEM01. Dbf








Dbverify-Verification Complete





Total pages Checked: 209920


Total pages processed (data): 132380


Total number of pages failed (data): 0


Total pages processed (index): 57168


Total number of pages failed (index): 0


Total pages processed (other): 3112


Total number of pages processed (paragraph): 1


Total number of failed pages (segments): 0


Total number of empty pages: 17260


Total number of pages marked as corrupted: 0


Total pages flowing: 0


Total number of encrypted pages: 0


Top Block scn:188826853 (5.188826853)


Here found that when we bbed verify the non-bad block, the use of DBV detection is still bad block, you can see that DBV verification than bbed more stringent

Original from: http://www.xifenfei.com/2016/03/bbed-recovery-corrupted-block.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.