BBED标记坏块以及修复坏块
来源:互联网 发布:知乎怎么找匿名回答 编辑:程序博客网 时间:2024/05/04 10:23
创建测试表:
ZBDBA@orcl11g>select * from zbdba;NAME------------------------------------------------------------zbdbahuihuiZBDBA@orcl11g>ZBDBA@orcl11g>ZBDBA@orcl11g>ZBDBA@orcl11g>ZBDBA@orcl11g>select rowid,dbms_rowid.rowid_object(rowid) robject, 2 dbms_rowid.rowid_relative_fno(rowid) fno, 3 dbms_rowid.rowid_block_number(rowid) bno, 4 dbms_rowid.rowid_row_number(rowid) rno from zbdba where rownum=1;ROWID ROBJECT FNO BNO RNO------------------ ---------- ---------- ---------- ----------AAASMNAAGAAAAC/AAA 74509 6 191 0
使用bbed修改块状态:
BBED> set file 6 block 191 FILE# 6 BLOCK# 191BBED> mapFile: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 191 Dba:0x018000bf------------------------------------------------------------KTB Data Block (Table/Cluster)struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdbh, 14 bytes @100 struct kdbt[1], 4 bytes @114 sb2 kdbr[2] @118 ub1 freespace[8047] @122 ub1 rowdata[19] @8169 ub4 tailchk @8188 BBED> p kcbhstruct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x018000bf ub4 bas_kcbh @8 0x005036cd ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0x426d ub2 spare3_kcbh @18 0x0000BBED> modify /x ff offset 14Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 191 Offsets: 14 to 525 Dba:0x018000bf------------------------------------------------------------------------ff066d42 00000100 00000d23 01009636 50000000 00000200 3200b800 8001130002001800 0000e90b 80021100 38000220 0000cd36 50000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000001 0200ffff 1600851f6f1f6f1f 00000200 8f1f851f 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000<32 bytes per line>BBED> p kcbhstruct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x018000bf ub4 bas_kcbh @8 0x005036cd ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0xff ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0x426d ub2 spare3_kcbh @18 0x0000BBED> sum applyCheck value for File 6, Block 191:current = 0x4293, required = 0x4293再回数据库查看该表:
ZBDBA@orcl11g>select * from zbdba;select * from zbdba *ERROR at line 1:ORA-01578: ORACLE data block corrupted (file # 6, block # 191)ORA-01110: data file 6: '/opt/oracle/oradata/orcl11g/zbdba01.dbf'
常规坏块的处理方式:
1、event 10231
2、rowid抽取
3、DBMS_REPAIR
这里我用bbed修复该块:
BBED> p kcbhstruct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x018000bf ub4 bas_kcbh @8 0x005036cd ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0xff ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0x4293 ub2 spare3_kcbh @18 0x0000BBED> p tailchkub4 tailchk @8188 0x36cd0601这里tailchk信息正确,无需修改
BBED> modify /x 01 offset 14Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 191 Offsets: 14 to 525 Dba:0x018000bf------------------------------------------------------------------------01069342 00000100 00000d23 01009636 50000000 00000200 3200b800 8001130002001800 0000e90b 80021100 38000220 0000cd36 50000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000001 0200ffff 1600851f6f1f6f1f 00000200 8f1f851f 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000<32 bytes per line>BBED> p kcbhstruct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x018000bf ub4 bas_kcbh @8 0x005036cd ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0x4293 ub2 spare3_kcbh @18 0x0000BBED> sum applyCheck value for File 6, Block 191:current = 0x426d, required = 0x426dBBED> verifyDBVERIFY - Verification startingFILE = /opt/oracle/oradata/orcl11g/zbdba01.dbfBLOCK = 191DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 1Total Blocks Failing (Data) : 0Total Blocks Processed (Index): 0Total Blocks Failing (Index): 0Total Blocks Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBED再次去数据库查询:
ZBDBA@orcl11g>select * from zbdba;NAME------------------------------------------------------------zbdbahuihui
1 0
- BBED标记坏块以及修复坏块
- bbed copy修复坏块和delete的数据
- UBI - 标记坏块
- Oracle 坏块修复
- Oracle BBED模拟坏块&验证坏块
- bbed处理一个坏块的过程
- mkdosfs 标记磁盘坏块
- 使用dbms_repair修复坏块
- postgres数据库坏块修复
- dbms_repair包修复坏块
- oracle数据库坏块修复
- 使用 DBMS_REPAIR 修复坏块
- 使用 DBMS_REPAIR 修复坏块
- repair failure修复坏块
- bad block 坏块修复
- bad block 坏块修复
- 坏块
- Oracle坏块问题处理 Oracle坏块修复 Oracle坏块怎么办
- Linux系统中的gadgetfs介绍(续)
- iBatis与MyBatis区别2
- 单机模式下虚拟机vmware中centos6.2启动问题
- iOS字符串常用操作集合
- Eclipse 中jsp中文乱码
- BBED标记坏块以及修复坏块
- Android 命名规范
- BT 的初步探索
- Yii Framework 控制器
- 各种排序算法总结和比较
- jQuery UI 与 jquery 的主要区别
- Linux下查看网关gateway方法:
- NotePad++如何打开远程服务器上的文件
- IOS使用第三方字体