找回密码
 立即注册
首页 业界区 安全 obet实现对数据文件坏块检测功能(obet dbv) ...

obet实现对数据文件坏块检测功能(obet dbv)

卢莹洁 8 小时前
通过一段时间的测试和使用,obet修复了不少bug,关于obet的以往功能和特性的文章:
Oracle数据块编辑工具( Oracle Block Editor Tool)-obet
obet(Oracle Block Editor Tool)第二版发布
并且也在客户的生产环境上进行了实战bet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308).利用周末的时间又对obet的工具进行了功能增强,增加了dbv(数据块校验)功能.

Oracle dbv的不足
1. oracle dbv需要在安装oracle服务端的环境下才能执行
2. oracle dbv对于文件大小不正确(文件头记录block数和实际文件大小不匹配),文件头损坏等情况都可能导致dbv无法执行,类似下面的报错
C:\Users\XFF>dbv file=H:\BaiduNetdisk\kingdee\system01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 1月 11 17:30:29 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.  DBV-00107: 未知标头格式 (0) (2054913149) C:\Users\XFF>
C:\Users\XFF>dbv file=H:\BaiduNetdisk\kingdee\users01.dbf DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 1月 11 20:10:05 2026 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.  DBV-00102: FILE (H:\BAIDUNETDISK\KINGDEE\USERS01.DBF) 在 end read 操作 (-1) 期间出现文件 I/O 错误 C:\Users\XFF>
3. oracle dbv一条命令执行检测一个数据文件,如果数据文件多,检查起来很繁琐
4. oracle dbv么有检查进度,对于io性能较慢,数据文件较大的情况,无法跟踪检查进度.

obet的dbv功能使用
1. 配置listfile.txt文件,格式为file# name
1 H:\BaiduNetdisk\kingdee\system01.dbf5 H:\BaiduNetdisk\kingdee\EAS_D_EAS_STANDARD.ORA
2. 启动obet,执行open listfile.txt(如果不在obet目录提供完整路径)
OBET> open listfile.txtLoaded 2 files from config file 'listfile.txt'. OBET> info Loaded files (2 total):----------------------------------------Number  Path----------------------------------------     1  H:\BaiduNetdisk\kingdee\system01.dbf     5  H:\BaiduNetdisk\kingdee\EAS_D_EAS_STANDARD.ORA----------------------------------------
3. 执行dbv命令(logfile 部分为可选),默认会记录日志在obet目录下面dbv_年月日时分秒.log的日志
OBET> dbv ===============================================DBV (Data Block Verification)Block Size: 8192 bytes=============================================== Verifying file #1: H:\BaiduNetdisk\kingdee\system01.dbf (131841 blocks) - Started: 2026-01-11 18:03:58file 1, block 0: checksum error (expected 0xC4DA, got 0xC478), bad blockfile 1, block 1: checksum error (expected 0xF835, got 0xB835), bad block  Progress: 10000 / 131841 blocks checked...  Progress: 20000 / 131841 blocks checked...……………….  Progress: 120000 / 131841 blocks checked...  Progress: 130000 / 131841 blocks checked...  File #1 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 2 checksum error, 0 rdba errorVerifying file #5: H:\BaiduNetdisk\kingdee\EAS_D_EAS_STANDARD.ORA (4194303 blocks) - Started: 2026-01-11 18:04:08  Progress: 10000 / 4194303 blocks checked...  Progress: 20000 / 4194303 blocks checked...……………………  Progress: 260000 / 4194303 blocks checked...  Progress: 270000 / 4194303 blocks checked...file 5, block 277678: tailchk error (expected 0x0228BB21, got 0x0228AD21), bad blockfile 5, block 277679: rdba error (expected 277679, got 277615), bad blockfile 5, block 277680: rdba error (expected 277680, got 277616), bad blockfile 5, block 277681: rdba error (expected 277681, got 277617), bad block………………file 5, block 277692: rdba error (expected 277692, got 277628), bad blockfile 5, block 277693: rdba error (expected 277693, got 277629), bad blockfile 5, block 277694: rdba error (expected 277694, got 277630), bad blockfile 5, block 279406: tailchk error (expected 0x02281E22, got 0x00000700), bad blockfile 5, block 279407: rdba error (expected 279407, got 448), bad blockfile 5, block 279408: rdba error (expected 279408, got 0), bad block………………  Progress: 280000 / 4194303 blocks checked...  Progress: 290000 / 4194303 blocks checked...  Progress: 300000 / 4194303 blocks checked...  Progress: 310000 / 4194303 blocks checked...file 5, block 312932: tailchk error (expected 0x0106C0B8, got 0x010629B8), bad blockfile 5, block 312933: rdba error (expected 312933, got 312869), bad blockfile 5, block 312934: rdba error (expected 312934, got 312870), bad blockfile 5, block 312935: rdba error (expected 312935, got 312871), bad blockfile 5, block 312936: rdba error (expected 312936, got 312872), bad blockfile 5, block 312937: rdba error (expected 312937, got 312873), bad blockfile 5, block 312938: rdba error (expected 312938, got 312874), bad blockfile 5, block 312939: rdba error (expected 312939, got 312875), bad block………………  Progress: 4180000 / 4194303 blocks checked...  Progress: 4190000 / 4194303 blocks checked...  File #5 completed: 1 all zero, 0 soft corrupted, 13 tailchk error, 1 checksum error, 255 rdba error DBV completed at: 2026-01-11 18:09:30 ===============================================DBV Summary:Total blocks checked: 4325872Total all zero blocks found: 1Total all rdba error blocks found: 255Total all tailchk error blocks found: 13Total all soft corrupted blocks found: 0Total all checksum error blocks found: 3Total bad blocks found: 272=============================================== Detailed report saved to: dbv_20260111180358.log OBET>
检测效果截图
1.png


  • Oracle坏块修复工具atch_blk
  • DBV-00600: 致命错误 – [21] [5] [0] [0] 错误原因
  • 比特币加密勒索间隔加密
  • obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308)
  • 假坏块引起恐慌
  • ORA-600 6807恢复
  • obet(Oracle Block Editor Tool)第二版发布
  • 乱用_allow_resetlogs_corruption参数导致悲剧
  • ORA-01578坏块解决(1)
  • ORA-00227: corrupt block detected in control file
  • table中各种坏块对select/dml操作影响
  • 通过rowid获取segment header坏块数据

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册