<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; obet dbv</title>
	<atom:link href="https://www.xifenfei.com/tag/obet-dbv/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Sun, 22 Nov 2026 15:21:14 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>通过obet 恢复system坏块,打开数据库</title>
		<link>https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html</link>
		<comments>https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html#comments</comments>
		<pubDate>Sat, 22 Aug 2026 13:39:33 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[obet]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[obet system]]></category>
		<category><![CDATA[obet 修复坏块]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12307</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html" target="_blank">通过obet 恢复system坏块,打开数据库</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>客户由于误操作直接在虚拟化平台点击电源键,强制关闭了正在运行的数据库服务器虚机,导致数据库无法正常启动,检查发现ntfs文件系统损坏<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/ntfs-err.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/ntfs-err.png" alt="ntfs-err" width="1448" height="885" class="alignnone size-full wp-image-12308" /></a><br />
<hr />
通过obet工具检测数据文件坏块(<a href="https://www.xifenfei.com/2026/08/obetdbv.html" title="obet dbv功能完整说明" rel="noopener" target="_blank">obet dbv功能完整说明</a>),发现核心的system文件上面有一些坏块</p>
<pre class="brush: bash; title: ; notranslate">
File #1: D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF (225281 blocks) - Started: 2026-08-21 16:40:23
File #1: rfile=1 (0x00000001)  header_block_num=225280 (0x00037000)  filesize_status:OK
file 1, block 212238: tailchk error (expected 0x0106276F, got 0x01065E92), bad block
file 1, block 213507: tailchk error (expected 0x0106276F, got 0x01065E92), bad block
file 1, block 213515: tailchk error (expected 0x01065E92, got 0x0106276F), bad block
file 1, block 213547: tailchk error (expected 0x0106276F, got 0x01065E92), bad block
file 1, block 213555: tailchk error (expected 0x01065E92, got 0x0106276F), bad block
file 1, block 221387: tailchk error (expected 0x0106276F, got 0x01065E92), bad block
file 1, block 221403: tailchk error (expected 0x01065E92, got 0x0106B19C), bad block
file 1, block 221419: tailchk error (expected 0x01065E92, got 0x0106C7E3), bad block
file 1, block 222117: tailchk error (expected 0x01065E92, got 0x0106276F), bad block
file 1, block 222133: tailchk error (expected 0x0106276F, got 0x01065E92), bad block
file 1, block 222141: tailchk error (expected 0x01065E92, got 0x0106276F), bad block
file 1, block 222173: tailchk error (expected 0x0106C7E3, got 0x01065E92), bad block
  File #1 completed: 0 all zero, 0 soft corrupted, 12 tailchk error, 0 checksum error, 0 rdba error
</pre>
<p>这个12个坏块的数量和dbv检测结果一致</p>
<pre class="brush: bash; title: ; notranslate">

DBVERIFY: Release 19.0.0.0.0 - Production on 星期五 8月 21 17:37:02 2026

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.


DBVERIFY - 开始验证: FILE = D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF
页 212238 流入 - 很可能是介质损坏
Corrupt block relative dba: 0x00433d0e (file 1, block 212238)
Fractured block found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x00433d0e
 last change scn: 0x0000.0002.d71a6f27 seq: 0x1 flg: 0x06
 spare3: 0x0
 consistency value in tail: 0x925e0601
 check value in block header: 0x93bb
 computed block checksum: 0xfd79

…………

页 222173 流入 - 很可能是介质损坏
Corrupt block relative dba: 0x004363dd (file 1, block 222173)
Fractured block found during dbv: 
Data in bad block:
 type: 6 format: 2 rdba: 0x004363dd
 last change scn: 0x0000.0002.d708e3c7 seq: 0x1 flg: 0x06
 spare3: 0x0
 consistency value in tail: 0x925e0601
 check value in block header: 0xe089
 computed block checksum: 0x7199


DBVERIFY - 验证完成

检查的页总数: 225280
处理的页总数 (数据): 125451
失败的页总数 (数据): 0
处理的页总数 (索引): 29984
失败的页总数 (索引): 0
处理的页总数 (其他): 48214
处理的总页数 (段)  : 1
失败的总页数 (段)  : 0
空的页总数: 21619
标记为损坏的总页数: 12
流入的页总数: 12
加密的总页数        : 0
最高块 SCN            : 12199365950 (2.3609431358)
</pre>
<p>使用obet的reair block功能进行修复(<a href="https://www.xifenfei.com/wp-content/uploads/recover_check/obet_manual.html#cmd-repair" title="obet repair block使用说明" rel="noopener" target="_blank">obet repair block使用说明</a>)</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; set file 1
filename set to: D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF (file#1)

OBET&gt; set block 212238
block set to: 212238

OBET&gt; d

File: D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF
Block: 212238                Offsets:     0 to    31
--------------------------------------------------------------------------------
67A1C000 06A20000 0E3D4300 276F1AD7 02000106 BB930000 02000000 D0020000 E46E1AD7

&lt;32 bytes read&gt;

OBET&gt; tailchk
Check tailchk for File D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF, Block 212238:
current = 0x925E0601, required = 0x6F270601

OBET&gt; backup
Backing up file #1, block 212238
Successfully backed up block 212238 from D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF 
   to backup_blk\SYSTEM01.DBF.212238_20260821173825.blk

OBET&gt; set mode edit
mode set to: edit

OBET&gt; repair
Usage: repair [subcommand]
  repair block [file N] [X]  - Repair tailchk/checksum (optional: file N, block X)
  repair blkscn [file N] [X] - Repair block SCN (optional: file N, block X)

OBET&gt; repair block
Warning: Missing value for 'block', using global setting: 212238

Repairing block 212238 in file D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF...

Repair analysis for block 212238:
1. seq_kcbh check: 0x01 -&gt; OK
2. Tailchk check: 0x925E0601 -&gt; needs repair (0x6F270601)
3. Checksum check: 0xBB93 -&gt; OK

Confirm repair operations:
File: D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF
Block: 212238
Operations needed: fix tailchk
Confirm? (Y/YES to proceed): y

Verification after repair:
1. seq_kcbh: 0x01 OK
2. Tailchk: 0x6F270601 OK
3. Checksum: 0xBB93 OK

Block 212238 repair completed successfully.
</pre>
<p>所有坏块依次进行修复,然后再次使用dbv检测</p>
<pre class="brush: bash; title: ; notranslate">

DBVERIFY: Release 19.0.0.0.0 - Production on 星期五 8月 21 17:42:02 2026

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.


DBVERIFY - 开始验证: FILE = D:\APP\ADMINISTRATOR\ORADATA\NHIS\SYSTEM01.DBF
Block Checking: DBA = 4407811, Block Type = KTB-managed data block
**** actual rows locked by itl 2  = 0 != # in trans. header = 1
**** actual rows locked by itl 3  = 0 != # in trans. header = 1
---- end index block validation
页 213507 失败, 校验代码为 6401
Block Checking: DBA = 4407819, Block Type = KTB-managed data block
**** row 120: key out of order
**** actual rows locked by itl 2  = 0 != # in trans. header = 1
**** actual rows marked deleted = 1 != kdxlende = 0
---- end index block validation
页 213515 失败, 校验代码为 6401

DBVERIFY - 验证完成

检查的页总数: 225280
处理的页总数 (数据): 125451
失败的页总数 (数据): 0
处理的页总数 (索引): 29996
失败的页总数 (索引): 2
处理的页总数 (其他): 48214
处理的总页数 (段)  : 1
失败的总页数 (段)  : 0
空的页总数: 21619
标记为损坏的总页数: 0
流入的页总数: 0
加密的总页数        : 0
最高块 SCN            : 12199365950 (2.3609431358)
</pre>
<p>有两个block有少量逻辑错误,可以通过数据库级别设置进行跳过,基本上实现了这个12个坏块的自动修复.后续就是数据库的打开过程</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; startup mount pfile='d:/pfile.txt'
ORACLE 例程已经启动。

Total System Global Area 1.2885E+10 bytes
Fixed Size                 16120656 bytes
Variable Size            7751073792 bytes
Database Buffers         5100273664 bytes
Redo Buffers               17432576 bytes
数据库装载完毕。
SQL&gt; recover database;
ORA-00283: 恢复会话因错误而取消
ORA-00742: 日志读取在线程 1 序列 19828 块 11511 中检测到写入丢失情况
ORA-00312: 联机日志 2 线程 1: 'D:\APP\ADMINISTRATOR\ORADATA\NHIS\REDO02.LOG'

SQL&gt; RECOVER DATABASE UNTIL TIME '2026-08-21:13:28:56' USING BACKUP CONTROLFILE;
ORA-00279: change 12198905983 generated at 08/21/2026 12:43:18 needed for
thread 1
ORA-00289: suggestion :
D:\APP\ADMINISTRATOR\PRODUCT\19.0.0\DBHOME_1\RDBMS\ARC0000019827_1199133733.0001
ORA-00280: change 12198905983 for thread 1 is in sequence #19827


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
D:\APP\ADMINISTRATOR\ORADATA\NHIS\REDO01.LOG
ORA-00279: change 12199301614 generated at 08/21/2026 13:27:06 needed for
thread 1
ORA-00289: suggestion :
D:\APP\ADMINISTRATOR\PRODUCT\19.0.0\DBHOME_1\RDBMS\ARC0000019828_1199133733.0001
ORA-00280: change 12199301614 for thread 1 is in sequence #19828
ORA-00278: log file 'D:\APP\ADMINISTRATOR\ORADATA\NHIS\REDO01.LOG' no longer
needed for this recovery


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
D:\APP\ADMINISTRATOR\ORADATA\NHIS\REDO02.LOG
ORA-00756: 鎭㈠鎿嶄綔妫€娴嬪埌鏁版嵁鍧楀啓鍏ヤ涪澶?ORA-10567:
Redo is inconsistent with data block (file# 4, block# 31663, file offset is 259383296 bytes)
ORA-10564: tablespace UNDOTBS1
ORA-01110: 鏁版嵁鏂囦欢 4: 'D:\APP\ADMINISTRATOR\ORADATA\NHIS\UNDOTBS01.DBF'
ORA-10560: block type 'KTU UNDO BLOCK'

ORA-01112: media recovery not started

SQL&gt; alter database open resetlogs;

Database altered.
</pre>
<p>使用expdp导出数据,完成本次恢复任务<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/expdp_ok.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/expdp_ok.png" alt="expdp_ok" width="1046" height="195" class="alignnone size-full wp-image-12309" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/09/obet-repair-oracle-block.html" rel="bookmark" class="crp_title">obet快速修复oracle 位图损坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/wman-recovery.html" rel="bookmark" class="crp_title">年前几例Oracle数据库被加密为.wman的数据库故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/obet-csc-higher-than-block-scn.html" rel="bookmark" class="crp_title">obet修复csc higher than block scn类型坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/patch_blk.html" rel="bookmark" class="crp_title">Oracle坏块修复工具:Patch_blk</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-dbv.html" rel="bookmark" class="crp_title">obet实现对数据文件坏块检测功能</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/%e4%b9%b1%e7%94%a8_allow_resetlogs_corruption%e5%8f%82%e6%95%b0%e5%af%bc%e8%87%b4%e6%82%b2%e5%89%a7.html" rel="bookmark" class="crp_title">乱用_allow_resetlogs_corruption参数导致悲剧</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/obet-version2.html" rel="bookmark" class="crp_title">obet(Oracle Block Editor Tool)第二版发布</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-miss-archivelog-recovery.html" rel="bookmark" class="crp_title">obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obetdbv.html" rel="bookmark" class="crp_title">obet dbv功能完整说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.html" rel="bookmark" class="crp_title">记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/obet-ora-704-ora-604-ora-1578.html" rel="bookmark" class="crp_title">obet处理ORA-704 ORA-604 ORA-1578故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/bbed%e5%a4%84%e7%90%86ora-01200%e6%95%85%e9%9a%9c.html" rel="bookmark" class="crp_title">bbed处理ORA-01200故障</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>obet dbv功能完整说明</title>
		<link>https://www.xifenfei.com/2026/08/obetdbv.html</link>
		<comments>https://www.xifenfei.com/2026/08/obetdbv.html#comments</comments>
		<pubDate>Sun, 16 Aug 2026 10:03:49 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[小工具]]></category>
		<category><![CDATA[obet dbv]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12300</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/08/obetdbv.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/08/obetdbv.html" target="_blank">obet dbv功能完整说明</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>大量的恢复经验和实战总结,逐步了完善obet(Oracle Block Edit Tool)功能和实现恢复的便利性.对于数据库恢复其中一个重要功能就是检测数据块的损坏情况(这个直接关系到恢复的实际效果),Oracle本身提供的dbv功能有一些不足,obet工具的dbv功能是对oracle本身的dbv功能的深度完善,弥补其本身的几个功能不足点:<br />
1. Oracle dbv 需要安装oracle 软件,对于有些时候为了一个dbv检测需要安装Oracle 软件，成本和动作太大,obet工具直接单个文件即可运行<br />
2. 如果数据文件头损坏,或者文件大小不对,或者block 0损坏,Oracle自带dbv均无法检测<br />
3. Oracle dbv无法实现跨字节序检测(比如需要在win平台上检测aix系统的数据文件的坏块情况[比如硬件恢复场景需要])<br />
4. Oracle dbv有些版本无法实现低版本dbv检测高版本数据库文件<br />
5. Oracle dbv无法一条命令实现多个数据文件检测(需要人工写脚本来实现)<br />
<br />
在使用obet的dbv功能之前需要准备listfile文件(内容格式:No Name)<br />
<strong>listfile文件操作</strong><br />
1. 在可以mount的库中可以直接通过查询v$datafile(select file#,name from v$datafile),把结果保存到listfile.txt中<br />
2. 通过obet的listfile功能直接获取</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; listfile
Usage: listfile &lt;path|remove|edit&gt;
  listfile &lt;path&gt;   - Scan directory and write to listfile.txt
  listfile remove   - Delete listfile.txt
  listfile edit [path] - Edit listfile.txt (notepad on Win, vi on Linux)
</pre>
<p>listfile
<path>支持*通配符</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; listfile e:\oradata\orcl\sys*.dbf
Listed 2 files from 'e:\oradata\orcl' to listfile.txt (starting from #1).

OBET&gt; open listfile.txt
Loaded 2 files from  datafile list 'listfile.txt'.

OBET&gt; info

Loaded files (2 total):
----------------------------------------
Number  Path
----------------------------------------
     1  e:\oradata\orcl\SYSAUX01.DBF
     2  e:\oradata\orcl\SYSTEM01.DBF
----------------------------------------
</pre>
<p>listfile remove 直接删除掉当前目录下面的listfile.txt文件<br />
listfile edit 直接调用notepad/vi 编辑模式打开当前目录下的listfile.txt文件(也可以指定具体文件名称)<br />
3. 使用open命令加载listfile</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; open listfile.txt
Loaded 2 files from  datafile list 'listfile.txt'.

OBET&gt; info

Loaded files (2 total):
----------------------------------------
Number  Path
----------------------------------------
     1  e:\oradata\orcl\SYSAUX01.DBF
     2  e:\oradata\orcl\SYSTEM01.DBF
----------------------------------------
</pre>
<p><strong>dbv之前确认参数设置</strong><br />
在执行dbv之前需要先确认当前一些配置,和dbv相关的主要是blocksize(默认值为8192),endian(默认值为little),可以通过show命令查看(如果是检测linux/win环境下默认的oracle数据文件,理论上不用这修改这些值)</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; show

Current settings:
File: (not set)
Blocksize: 8192 bytes
Block: 1
Offset in block: 0 (file offset: 0x00002000)
Count: 32 bytes
Mode: browse
Endian: little (x86)
Loaded files: 2 (use 'info' to list)
</pre>
<p>可以根据情况通过set命令修改相关值,具体语法为:set
<param> <value></p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; set
Usage: set &lt;param&gt; &lt;value&gt;
  set filename &lt;path&gt;    - Set target file path (required)
  set file &lt;num&gt;         - Set filename using loaded file number (from open list)
  set blocksize &lt;size&gt;  - Set block size (2048,4096,[8192],16384,32768)
  set block &lt;num&gt;        - Set block number (starts from 0, default: 1)
  set offset &lt;offset&gt;   - Set offset within block (&lt; blocksize, default: 0)
  set count &lt;bytes&gt;      - Set number of bytes to read (default: 32)
  set mode edit/browse   - Enable edit/browse mode
  set endian big/little  - Set byte order (default: little, big for AIX files)
</pre>
<p><strong>dbv 检测数据文件</strong><br />
具体语法为:dbv [file N [block M [blocks X]]]<br />
dbv  检测open listfile中的所有数据文件的所有block<br />
dbv file N 检测listfile中编号为N的数据文件的所有block<br />
dbv file N block M 检测listfile中编号为N的数据文件的block M开始到文件结束<br />
dbv file N block M block X 检测listfile中编号为N的数据文件的block M开始,检测X个block</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; dbv

===============================================
DBV (Data Block Verification)
Block Size: 8192 bytes
Endian:     little-endian (x86)
Target File: ALL files in listfile
===============================================

Verifying file #1: e:\oradata\orcl\SYSAUX01.DBF (139521 blocks) - Started: 2026-08-16 17:37:25
File #1: rfile=2 (0x00000002)  header_block_num=139520 (0x00022100)  filesize_status:OK
  Progress: 100000 / 139521 blocks checked...
  File #1 completed: no bad blocks found
Verifying file #2: e:\oradata\orcl\SYSTEM01.DBF (126721 blocks) - Started: 2026-08-16 17:37:26
File #2: rfile=1 (0x00000001)  header_block_num=126720 (0x0001EF00)  filesize_status:OK
  Progress: 100000 / 126721 blocks checked...
  File #2 completed: no bad blocks found

DBV completed at: 2026-08-16 17:37:26

===============================================
DBV Summary:
Total blocks checked: 266242
Total all zero blocks found: 0
Total all rdba error blocks found: 0
Total all tailchk error blocks found: 0
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 0
Execution time: 1.00 seconds
Throughput: 2080.02 MB/s
===============================================

Detailed report saved to: dbv_20260816173725.log
Files processed: 2

OBET&gt; dbv file 1

===============================================
DBV (Data Block Verification)
Block Size: 8192 bytes
Endian:     little-endian (x86)
Target File: #1 (only)
===============================================

Verifying file #1: e:\oradata\orcl\SYSAUX01.DBF (139521 blocks) - Started: 2026-08-16 17:37:31
File #1: rfile=2 (0x00000002)  header_block_num=139520 (0x00022100)  filesize_status:OK
  Progress: 100000 / 139521 blocks checked...
  File #1 completed: no bad blocks found

DBV completed at: 2026-08-16 17:37:32

===============================================
DBV Summary:
Total blocks checked: 139521
Total all zero blocks found: 0
Total all rdba error blocks found: 0
Total all tailchk error blocks found: 0
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 0
Execution time: 1.00 seconds
Throughput: 1090.01 MB/s
===============================================

Detailed report saved to: dbv_file_1_20260816173731.log
Files processed: 1

OBET&gt; dbv file 1 block 128

===============================================
DBV (Data Block Verification)
Block Size: 8192 bytes
Endian:     little-endian (x86)
Target File: #1, block 128 to end
===============================================

Verifying file #1: e:\oradata\orcl\SYSAUX01.DBF (block 128 to 139520, 139393 blocks) - Started: 2026-08-16 17:37:42
File #1: rfile=2 (0x00000002)  header_block_num=139520 (0x00022100)  filesize_status:OK
  Progress: 100128 / 139521 blocks checked...
  File #1 completed: no bad blocks found

DBV completed at: 2026-08-16 17:37:43

===============================================
DBV Summary:
Total blocks checked: 139393
Total all zero blocks found: 0
Total all rdba error blocks found: 0
Total all tailchk error blocks found: 0
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 0
Execution time: 1.00 seconds
Throughput: 1090.01 MB/s
===============================================

Detailed report saved to: dbv_file_1_block_128_20260816173742.log
Files processed: 1

OBET&gt; dbv file 1 block 128 blocks 10

===============================================
DBV (Data Block Verification)
Block Size: 8192 bytes
Endian:     little-endian (x86)
Target File: #1, block 128 - 137 (10 blocks)
===============================================

Verifying file #1: e:\oradata\orcl\SYSAUX01.DBF (block 128 to 137, 10 blocks) - Started: 2026-08-16 17:37:47
File #1: rfile=2 (0x00000002)  header_block_num=139520 (0x00022100)  filesize_status:OK
  File #1 completed: no bad blocks found

DBV completed at: 2026-08-16 17:37:47

===============================================
DBV Summary:
Total blocks checked: 10
Total all zero blocks found: 0
Total all rdba error blocks found: 0
Total all tailchk error blocks found: 0
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 0
Execution time: 0.00 seconds
Throughput: 0.00 MB/s
===============================================

Detailed report saved to: dbv_file_1_block_128_20260816173747.log
Files processed: 1
</pre>
<p>检测的具体明细可以看obet所在的当前目录中的dbv*.log文件,里面有坏块类型:<br />
rdba error:表示block#和该块所在位置不匹配<br />
tailchk/checksum error:表示该block不满足Oracle的校验规则<br />
soft corrupted:表示该block在Oracle数据库标记为坏块<br />
zero block:表示该block中全部为0,一般是由于底层损坏,或者硬件恢复过程使用空块替代引起<br />
filesize_status:NO表示文件实际大小和文件头记录大小不匹配<br />
<a href="https://www.xifenfei.com/wp-content/uploads/recover_check/obet.zip" rel="noopener" target="_blank">下载obet</a> <a href="https://www.xifenfei.com/wp-content/uploads/recover_check/obet_manual.html" rel="noopener" target="_blank">obet使用说明</a></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-dbv.html" rel="bookmark" class="crp_title">obet实现对数据文件坏块检测功能</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.html" rel="bookmark" class="crp_title">记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/patch_blk.html" rel="bookmark" class="crp_title">Oracle坏块修复工具:Patch_blk</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/09/%e5%81%87%e5%9d%8f%e5%9d%97%e5%bc%95%e8%b5%b7%e6%81%90%e6%85%8c.html" rel="bookmark" class="crp_title">假坏块引起恐慌</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/obet-offline-datafile.html" rel="bookmark" class="crp_title">obet一键恢复offline数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/sap-oracle-recovery.html" rel="bookmark" class="crp_title">分享一例运行在aix上的sap系统数据库恢复过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-ora-1578.html" rel="bookmark" class="crp_title">kcratr_nab_less_than_odr和system坏块故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-oracle-block-editor-tool.html" rel="bookmark" class="crp_title">OBET-Oracle Block Editor Tool使用说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-miss-archivelog-recovery.html" rel="bookmark" class="crp_title">obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/wman-recovery.html" rel="bookmark" class="crp_title">年前几例Oracle数据库被加密为.wman的数据库故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/bbed%e5%a4%84%e7%90%86ora-01200%e6%95%85%e9%9a%9c.html" rel="bookmark" class="crp_title">bbed处理ORA-01200故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/09/obet-repair-oracle-block.html" rel="bookmark" class="crp_title">obet快速修复oracle 位图损坏块</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/08/obetdbv.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>几乎动用了所有手段的Oracle故障恢复</title>
		<link>https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html#comments</comments>
		<pubDate>Sat, 01 Aug 2026 15:47:51 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[obet extend]]></category>
		<category><![CDATA[obet merge]]></category>
		<category><![CDATA[oracle碎片]]></category>
		<category><![CDATA[OraScan]]></category>
		<category><![CDATA[rman强制提取文件]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12282</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html" target="_blank">几乎动用了所有手段的Oracle故障恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>最近处理了一个比较复杂的恢复,使用了十八般武艺基本上完成了恢复,最大限度恢复客户的数据<br />
<strong>故障背景</strong><br />
1. 客户两个1.8T盘做raid 1,操作系统是linux（分区swap,/ [lv方式]）运行oracle数据库(跑的是一家医院的his系统),前些年一直这样运行<br />
2. 今年4月份发现空间不足,维护人员发现主机上有一个sdb盘(裸盘,而且没有被使用),直接加入到/分区的lv中<br />
3. 前几天系统突然故障,数据库无法连接,他们排查原因的时候发现备份一体机的备份相关的配置和以前设置不一样了,以为故障和这个相关,然后他们就让备份一体机厂商把备份相关配置还原恢复,结果这个操作导致两个问题:1)备份一体机中所有的关于这个主机上的备份文件全部被删除;2)以前在这个主机上看到的sdb的lun也不见了(后来确认是备份一体机映射出来的,现在被回收回去了)<br />
4. 由于调整一体机相关设置之后,依旧无法解决问题,他们开始 怀疑是raid磁盘问题(可能这个时候也发现了raid上面有告警),然后多次尝试对两个盘进行插拔操作,最后导致raid也异常<br />
5. 客户的备份机制:先备份在本地的/分区(也就是说备份文件很可能部分写入到了sdb盘),然后再传输到备份一体机中.<br />
<br />
<strong>恢复思路</strong><br />
1. 镜像损坏的raid磁盘<br />
2. 通过损坏的磁盘中恢复出来可以恢复的数据文件<br />
3. 通过碎片扫描磁盘,把由于元数据丢失导致部分在镜像磁盘中的数据块恢复出来<br />
4. 通过提取镜像磁盘中的备份,并尽可能的恢复出来需要的业务数据块(基于客户这边的情况,备份是最近写的,大概率是在sdb盘上面占比大,所以直接可以还原的概率很小)<br />
5. 通过工具把3和4中提取出来的block,整合到2中的数据文件中<br />
6. 然后打开数据导出数据(设置跳过坏块)<br />
<br />
<strong>具体恢复操作</strong><br />
1. 恢复损坏磁盘中的数据文件<br />
接手这个故障之后,让客户想对raid 1中的其中一块磁盘进行镜像,通过工具分析确认是vg少了一块盘<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/lost_disk.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/lost_disk.jpg" alt="lost_disk" width="931" height="109" class="alignnone size-full wp-image-12285" /></a><br />
<hr />
通过镜像文件恢复数据文件(由于lv包含了已经丢失的sdb盘),所以数据肯定不完整,但是理论上今年4月份之前的数据应该相对完整,先通过工具对镜像进行解析,恢复镜像中的数据文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/df.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/df.jpg" alt="df" width="904" height="614" class="alignnone size-full wp-image-12283" /></a><br />
<hr />
在拷贝过程中发现部分文件有报错,通过文件系统元数据查看报错数据文件分布元数据信息,确认部分数据段存放在了sdb盘上面<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/fra.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/fra.jpg" alt="fra" width="974" height="697" class="alignnone size-full wp-image-12284" /></a><br />
<hr />
通过对恢复出来的所有数据文件使用obet的dbv功能检测(<a href="https://www.xifenfei.com/2026/01/obet-dbv.html" title="obet实现对数据文件坏块检测功能" rel="noopener" target="_blank">obet实现对数据文件坏块检测功能</a>),并确认有6个数据文件异常</p>
<pre class="brush: bash; title: ; notranslate">
PS I:\2026年7月31日&gt; Get-Content .\dbv_20260731085210.log | Select-String &quot;filesize_status:NO&quot; -Context 2,0

  File #1: I:\20260731-jn\xxxx\system01.dbf (4167680 blocks) - Started: 2026-07-31 08:52:10
&gt; File #1: rfile=1 (0x00000001)  header_block_num=4175360 (0x003FB600)  filesize_status:NO

  File #2: I:\20260731-jn\xxxx\sysaux01.dbf (2470912 blocks) - Started: 2026-07-31 08:52:44
&gt; File #2: rfile=2 (0x00000002)  header_block_num=2536960 (0x0026B600)  filesize_status:NO

  File #24: I:\20260731-jn\xxxx\XXX406.DBF (2331648 blocks) - Started: 2026-07-31 08:55:58
&gt; File #24: rfile=24 (0x00000018)  header_block_num=2522880 (0x00267F00)  filesize_status:NO

  File #25: I:\20260731-jn\xxxx\XXX407.DBF (2292736 blocks) - Started: 2026-07-31 08:56:17
&gt; File #25: rfile=25 (0x00000019)  header_block_num=2484480 (0x0025E900)  filesize_status:NO

  File #26: I:\20260731-jn\xxxx\XXXX408.DBF (2291712 blocks) - Started: 2026-07-31 08:56:36
&gt; File #26: rfile=26 (0x0000001A)  header_block_num=2483200 (0x0025E400)  filesize_status:NO

  File #27: I:\20260731-jn\xxxx\sysaux02.dbf (832512 blocks) - Started: 2026-07-31 08:56:55
&gt; File #27: rfile=27 (0x0000001B)  header_block_num=920832 (0x000E0D00)  filesize_status:NO
</pre>
<p>这里主要是file 24,25,26涉及业务数据,对于system 大概率是aud$记录,sysaux可以直接忽略.<br />
<br />
2. 对镜像盘进行碎片扫描,尽可能多的找数据块<br />
对于异常文件缺少的数据块,先尝试对进行磁盘进行碎片扫描最大限度恢复可以由于文件系统元数据写入到sdb磁盘导致的丢失数据,使用<a href="https://www.xifenfei.com/2026/04/orascan.html" title="OraScan(Oracle 碎片扫描工具) 使用说明" rel="noopener" target="_blank">OraScan(Oracle 碎片扫描工具)</a>进行碎片扫描,恢复出来数据文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/orascan.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/orascan.jpg" alt="orascan" width="1154" height="679" class="alignnone size-full wp-image-12286" /></a><br />
<hr />
3. 先从操作系统中恢复出来备份文件,然后使用工具在备份中强制提取file为24,25,26数据文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/rman.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/rman.jpg" alt="rman" width="965" height="731" class="alignnone size-full wp-image-12287" /></a><br />
<hr />
4. 使用obet最近开发的merge功能对文件进行整合,类似操作<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/merge.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/merge.jpg" alt="merge" width="650" height="711" class="alignnone size-full wp-image-12288" /></a><br />
<hr />
5. 最终恢复之后效果,所有业务数据块总的只有15149个损坏block(无法找出来)</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;grep &quot;File #&quot;  C:\Users\XFF\dbv_20260801233813.log
File #24: I:\20260731-jn\xxxx\XXX406.DBF (2522881 blocks) - Started: 2026-08-01 23:38:13
File #24: rfile=24 (0x00000018)  header_block_num=2522880 (0x00267F00)  filesize_status:OK
  File #24 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 0 checksum error, 4288 rdba error
File #25: I:\20260731-jn\xxxx\XXX407.DBF (2484481 blocks) - Started: 2026-08-01 23:39:14
File #25: rfile=25 (0x00000019)  header_block_num=2484480 (0x0025E900)  filesize_status:OK
  File #25 completed: 0 all zero, 1 soft corrupted, 0 tailchk error, 0 checksum error, 10604 rdba error
File #26: I:\20260731-jn\xxxx\XXX408.DBF (2483201 blocks) - Started: 2026-08-01 23:40:13
File #26: rfile=26 (0x0000001A)  header_block_num=2483200 (0x0025E400)  filesize_status:OK
  File #26 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 0 checksum error, 256 rdba error
</pre>
<p>6. 尝试打开数据库过程中遇到还有文件大小不对的问题</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; /
CREATE CONTROLFILE REUSE DATABASE &quot;XXX&quot; NORESETLOGS FORCE LOGGING NOARCHIVELOG
*
第 1 行出现错误:
ORA-01503: CREATE CONTROLFILE ??
ORA-01200: 853727 ????????? 920832 ??????
ORA-01110: ???? 27: 'I:\20260731-jn\xxxx\sysaux02.dbf'
</pre>
<p>使用obet的extend功能进行处理</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; extend file 1
File #1: I:\20260731-jn\xxx\sysaux02.dbf
  BlockSize:       8192 bytes
  Header Blocks:   920832 (offset 44)
  Expected Size:   7543463936 bytes ((920832+1)*8192)
  Actual Size:     6993739776 bytes
  Status: File is smaller than header record.
  Extending file by 549724160 bytes with zero-filled padding...
  Confirm? (Y/yes to proceed): Y
  Done. File extended to 7543463936 bytes.
</pre>
<p>然后打开数据库过程报各种错误处理</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database;
ORA-10562: Error occurred while applying redo to data block (file# 24, block# 2086190)
ORA-10564: tablespace TS_HIS4
ORA-01110: ???????? 24: 'I:\20260731-JN\XXXX\XXX406.DBF'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 93878
ORA-00600: ????????????, ????: [6122], [0], [81963], [0], [], [], [], [], [], [], [], []

SQL&gt; recover database until cancel;
ORA-00279: 更改 3573202216 (在  生成) 对于线程 1 是必需的


指定日志: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01194: 文件 1 需要更多的恢复来保持一致性
ORA-01110: 数据文件 1: 'I:\20260731-JN\XXXX\SYSTEM01.DBF'


ORA-01112: 未启动介质恢复


SQL&gt; alter database open resetlogs ;
alter database open resetlogs
*
第 1 行出现错误:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [0], [3573202226], [0],
[3573222676], [12583040], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [2662], [0], [3573202225], [0],
[3573222676], [12583040], [], [], [], [], [], []
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [3573202223], [0],
[3573222676], [12583040], [], [], [], [], [], []
进程 ID: 16884
会话 ID: 1 序列号: 3
</pre>
<p>通过patch_scn(<a href="https://www.xifenfei.com/2023/08/patch-scn-fast-recovery-ora-600-2662.html" title="Patch SCN一键解决ORA-600 2662故障" rel="noopener" target="_blank">Patch SCN一键解决ORA-600 2662故障</a>)解决这个问题之后,数据库顺利打开</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database open ;
alter database open
*
第 1 行出现错误:
ORA-01113: ?? 1 ??????
ORA-01110: ???? 1: 'I:\20260731-JN\XXXX\SYSTEM01.DBF'

SQL&gt; recover database;
完成介质恢复。
SQL&gt; alter database open;

数据库已更改。
</pre>
<p>然后按照客户需求导出数据,完成本次恢复任务.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/wman-recovery.html" rel="bookmark" class="crp_title">年前几例Oracle数据库被加密为.wman的数据库故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/deepseek_oracle_recovery_major_fault.html" rel="bookmark" class="crp_title">使用deepseek进行Oracle恢复,引起重大故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obetdbv.html" rel="bookmark" class="crp_title">obet dbv功能完整说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/orafhr-oracle-wman.html" rel="bookmark" class="crp_title">OraFHR快速open被勒索加密破坏的Oracle数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/11/win-datafile-recovery-case.html" rel="bookmark" class="crp_title">恢复案例分享：win丢失数据文件恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/obet-2026-07.html" rel="bookmark" class="crp_title">Oracle Block Edit Tool (obet) 功能增强&#8211;2026.07</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/air-db-recovery.html" rel="bookmark" class="crp_title">.[xueyuanjie@onionmail.org].AIR勒索加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/dd-asm-recovery.html" rel="bookmark" class="crp_title">在生产环境错误执行dd命令破坏asm磁盘故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html" rel="bookmark" class="crp_title">Oracle故障第一现场被恢复混乱的数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.html" rel="bookmark" class="crp_title">记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/redo-corrupt-recovery.html" rel="bookmark" class="crp_title">不太常见的10.2.0.1的oracle redo损坏恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Block Edit Tool (obet) 功能增强&#8211;2026.07</title>
		<link>https://www.xifenfei.com/2026/07/obet-2026-07.html</link>
		<comments>https://www.xifenfei.com/2026/07/obet-2026-07.html#comments</comments>
		<pubDate>Thu, 30 Jul 2026 23:43:14 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[小工具]]></category>
		<category><![CDATA[dump_undo]]></category>
		<category><![CDATA[obet]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[parse_ctl]]></category>
		<category><![CDATA[数据块编辑工具]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12274</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/obet-2026-07.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/07/obet-2026-07.html" target="_blank">Oracle Block Edit Tool (obet) 功能增强&#8211;2026.07</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>数据块编辑工具<a href="https://www.xifenfei.com/2025/11/obet-version2.html" title="obet(Oracle Block Editor Tool)第二版发布" rel="noopener" target="_blank">Oracle bbed升级版obet(Oracle Block Edit Tool)</a>， 基于ai编程的强大，根据近期恢复的需求情况，我对一些功能进行了升级，整体功能<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_help.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_help.jpg" alt="obet_help" width="1036" height="1034" class="alignnone size-full wp-image-12275" /></a><br />
<hr />
<strong>主要增加了上述框起来的功能</strong><br />
forcopy file N to
<path> 这个是当硬件有损坏，普通拷贝报错的时候，使用该命令最大限度拷贝数据<br />
extend file N这个是解决ORA-01200故障(一般是由于异常断电，或者文件系统恢复之后），数据文件实际大小小于文件头记录大小<br />
parse_ctl这个是直接解析control，并且生成创建控制文件语句，主要为了解决在oracle数据库无法mount的情况下，重建控制文件容易遗漏数据文件导致oracle后续open之后缺失部分数据文件而引起的各种故障风险<br />
dump_undo这个主要是在数据库open的过程中遭遇到undo回滚段异常，需要屏蔽回滚段时候，需要知道回滚段名称，这个命令可以直接获取<br />
通过set endian big/little命令来实现全面支持大小字节序<br />
<br />
<strong>linux平台还增加了patch_scn功能</strong><br />
这个功能是以前直接的<a href="https://www.xifenfei.com/2025/10/patch_scn-for-linux.html" title="Patch_SCN for Linux 功能完善" rel="noopener" target="_blank">patch_scn小工具</a>Patch_SCN for Linux 功能完善中的，现在整合到了obet里面<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_patch_scn.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_patch_scn.jpg" alt="obet_patch_scn" width="944" height="426" class="alignnone size-full wp-image-12276" /></a><br />
<strong>完善了各种命令的提示</strong><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_hint.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_hint.jpg" alt="obet_hint" width="897" height="487" class="alignnone size-full wp-image-12277" /></a><br />
<hr />
<strong>最近几天的实战操作</strong><br />
修改文件头scn<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_1.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_1.jpg" alt="obet_1" width="813" height="803" class="alignnone size-full wp-image-12278" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_2.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_2.jpg" alt="obet_2" width="1080" height="305" class="alignnone size-full wp-image-12279" /></a><br />
<hr />
dbv检查aix平台数据文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_dbv.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/obet_dbv.jpg" alt="obet_dbv" width="1080" height="736" class="alignnone size-full wp-image-12280" /></a><br />
<hr />
将来根据需求和客户实战情况，会进一步完善功能和修复bug</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/deepseek_oracle_recovery_major_fault.html" rel="bookmark" class="crp_title">使用deepseek进行Oracle恢复,引起重大故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/orafhr-oracle-wman.html" rel="bookmark" class="crp_title">OraFHR快速open被勒索加密破坏的Oracle数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html" rel="bookmark" class="crp_title">Oracle故障第一现场被恢复混乱的数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/wman-mysql-recovery.html" rel="bookmark" class="crp_title">.wman扩展名勒索mysql数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/air-db-recovery.html" rel="bookmark" class="crp_title">.[xueyuanjie@onionmail.org].AIR勒索加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/dd-asm-recovery.html" rel="bookmark" class="crp_title">在生产环境错误执行dd命令破坏asm磁盘故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/win-rm-datafile-recovery.html" rel="bookmark" class="crp_title">记录一次win删除数据文件完美恢复案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-recovery.html" rel="bookmark" class="crp_title">dd破坏包含50多个pdb的asm 磁盘组恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/hgdb-rm-rf-recovery.html" rel="bookmark" class="crp_title">记录一次国产数据库被rm -rf /*删除的救援过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/10/bres-dmp-recovery.html" rel="bookmark" class="crp_title">.bres勒索病毒加密数据库dmp文件可恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/orafhr.html" rel="bookmark" class="crp_title">Oracle数据库被勒索加密一键open工具&#8211;OraFHR</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/obet-2026-07.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle故障第一现场被恢复混乱的数据库恢复</title>
		<link>https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html</link>
		<comments>https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html#comments</comments>
		<pubDate>Wed, 13 May 2026 15:16:34 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[obet]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[ORA-600 2662 patch_scn]]></category>
		<category><![CDATA[patch_scn]]></category>
		<category><![CDATA[patch_scn修改scn]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12162</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html" target="_blank">Oracle故障第一现场被恢复混乱的数据库恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户数据库断电异常之后,由于第三方进行了一系列的恢复,现场比较混乱,无法判断最初情况,通过<a href="https://www.xifenfei.com/oracle_recovery_check" title="Oracle数据库异常恢复检查脚本(Oracle Database Recovery Check)" rel="noopener" target="_blank">Oracle Database Recovery Check</a>收集的结果进行初步判断<br />
1. 有三个文件处于丢失状态，并且数据库在故障之后被人强制resetlogs拉过库<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/file-missing.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/file-missing.png" alt="file-missing" width="1691" height="145" class="alignnone size-full wp-image-12163" /></a><br />
<hr />
2. 数据文件头scn不一致,而且相差的日志序列还比较大(该数据库为非归档模式)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/seq.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/seq.jpg" alt="seq" width="1693" height="245" class="alignnone size-full wp-image-12164" /></a><br />
<hr />
3. 该库多次重建ctl(alert日志中也有相关记录)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/rectl.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/rectl.jpg" alt="rectl" width="1707" height="93" class="alignnone size-full wp-image-12165" /></a><br />
<hr />
现在恢复这个库需要做的几件事情:<br />
1. 由于没有任何原始故障之后的控制文件,需要从服务器上找出来所有故障之时的数据文件,担心被人重建ctl使用了错误的数据文件<br />
2. 对于三个file missing的进行分析,并确认磁盘上是否存在,是否是好的,如果是好的需要和现在的文件一起作为一个整体进行恢复,并打开库<br />
3. 打开数据库过程可能遇到的错误处理<br />
<br />
通过obet中近期增加的get_dbinfo功能来解析所有可能的数据文件头（<a href="https://www.xifenfei.com/2025/11/obet-version2.html" title="obet(Oracle Block Editor Tool)第二版发布" rel="noopener" target="_blank">obet官方说明</a>）,结合文件头的信息判断,发现磁盘上名称dbf结尾的文件号重复<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/1.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/1.jpg" alt="1" width="1473" height="155" class="alignnone size-full wp-image-12166" /></a><br />
<hr />
这样的情况下,我们取filesize大,（scn大不一定正确,可能由于被强制resetlogs导致scn比正确的文件大）,同时也结合这个收集的信息,确认三个丢失的文件中两个为undotbs1表空间文件,另外一个为112k的数据文件,这里让我学习到了新知识,oracle的数据文件最小可以多少个block(通过试验测试,最小可以16个block,文件大小即为:16+1(block 0)*block_size)</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on 星期三 5月 13 22:05:52 2026

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; create tablespace tbs datafile 'e:/tbs01.dbf' size 8k;
create tablespace tbs datafile 'e:/tbs01.dbf' size 8k
*
第 1 行出现错误:
ORA-03214: 指定的文件大小小于所需的最小值


SQL&gt; create tablespace tbs datafile 'e:/tbs01.dbf' size 80k;
create tablespace tbs datafile 'e:/tbs01.dbf' size 80k
*
第 1 行出现错误:
ORA-03214: 指定的文件大小小于所需的最小值


SQL&gt; create tablespace tbs datafile 'e:/tbs01.dbf' size 96k;

表空间已创建。
</pre>
<p>确认好相关信息之后,然后对于三个file missing状态的文件进行dbv检测确认undotbs01.dbf(file 3)基本上全部损坏（大量全0块）,另外两个文件正常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/obet_dbv.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/obet_dbv.jpg" alt="obet_dbv" width="1404" height="799" class="alignnone size-full wp-image-12167" /></a><br />
<hr />
对于正常的文件通过obet修改相关scn信息<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/obet_resetlogs_scn.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/obet_resetlogs_scn.jpg" alt="obet_resetlogs_scn" width="1388" height="560" class="alignnone size-full wp-image-12168" /></a><br />
<hr />
然后重建控制文件(丢弃undotbs01.dbf文件),由于确认undo已经异常,直接设置undo为manual管理方式并屏蔽回滚段,然后屏蔽一致性,强制打开数据库,结果报ORA-600 2662错误<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/ora-600-2662.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/ora-600-2662.png" alt="ora-600-2662" width="1242" height="212" class="alignnone size-full wp-image-12169" /></a><br />
<hr />
使用Patch_SCN工具修改数据库scn(<a href="https://www.xifenfei.com/2025/10/patch_scn-for-linux.html" title="Patch_SCN for Linux 功能完善" rel="noopener" target="_blank">Patch_SCN工具说明</a>)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/05/patch_scn.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/05/patch_scn.jpg" alt="patch_scn" width="1488" height="684" class="alignnone size-full wp-image-12170" /></a><br />
<hr />
然后数据库顺利打开,重建新undo,增加temp,删除老undo,导出数据完成本次恢复任务</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/obet-2026-07.html" rel="bookmark" class="crp_title">Oracle Block Edit Tool (obet) 功能增强&#8211;2026.07</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/deepseek_oracle_recovery_major_fault.html" rel="bookmark" class="crp_title">使用deepseek进行Oracle恢复,引起重大故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/orafhr-oracle-wman.html" rel="bookmark" class="crp_title">OraFHR快速open被勒索加密破坏的Oracle数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/air-db-recovery.html" rel="bookmark" class="crp_title">.[xueyuanjie@onionmail.org].AIR勒索加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/win-rm-datafile-recovery.html" rel="bookmark" class="crp_title">记录一次win删除数据文件完美恢复案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/dd-asm-recovery.html" rel="bookmark" class="crp_title">在生产环境错误执行dd命令破坏asm磁盘故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/wman-mysql-recovery.html" rel="bookmark" class="crp_title">.wman扩展名勒索mysql数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/hgdb-rm-rf-recovery.html" rel="bookmark" class="crp_title">记录一次国产数据库被rm -rf /*删除的救援过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/redo-corrupt-recovery.html" rel="bookmark" class="crp_title">不太常见的10.2.0.1的oracle redo损坏恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/10/bres-dmp-recovery.html" rel="bookmark" class="crp_title">.bres勒索病毒加密数据库dmp文件可恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-recovery.html" rel="bookmark" class="crp_title">dd破坏包含50多个pdb的asm 磁盘组恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>obet实现对数据文件坏块检测功能</title>
		<link>https://www.xifenfei.com/2026/01/obet-dbv.html</link>
		<comments>https://www.xifenfei.com/2026/01/obet-dbv.html#comments</comments>
		<pubDate>Sun, 11 Jan 2026 12:16:51 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[小工具]]></category>
		<category><![CDATA[DBV-00102]]></category>
		<category><![CDATA[DBV-00107]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[obet坏块检测]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11913</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/01/obet-dbv.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2026/01/obet-dbv.html" target="_blank">obet实现对数据文件坏块检测功能</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>通过一段时间的测试和使用,obet修复了不少bug,关于obet的以往功能和特性的文章:<br />
<a href="https://www.xifenfei.com/2025/11/obet.html" title="Oracle数据块编辑工具( Oracle Block Editor Tool)-obet" rel="noopener" target="_blank">Oracle数据块编辑工具( Oracle Block Editor Tool)-obet</a><br />
<a href="https://www.xifenfei.com/2025/11/obet-version2.html" title="obet(Oracle Block Editor Tool)第二版发布" rel="noopener" target="_blank">obet(Oracle Block Editor Tool)第二版发布</a><br />
并且也在客户的生产环境上进行了实战:<a href="https://www.xifenfei.com/2026/01/obet-miss-archivelog-recovery.html" title="obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）" rel="noopener" target="_blank">obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）</a>.利用周末的时间又对obet的工具进行了功能增强,增加了dbv(数据块校验)功能.<br />
<br />
<strong>Oracle dbv的不足</strong><br />
1. oracle dbv需要在安装oracle服务端的环境下才能执行<br />
2. oracle dbv对于文件大小不正确(文件头记录block数和实际文件大小不匹配),文件头损坏等情况都可能导致dbv无法执行,类似下面的报错</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;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&gt;
</pre>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;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&gt;
</pre>
<p>3. oracle dbv一条命令执行检测一个数据文件,如果数据文件多,检查起来很繁琐<br />
4. oracle dbv么有检查进度,对于io性能较慢,数据文件较大的情况,无法跟踪检查进度.<br />
<br />
<strong>obet的dbv功能使用</strong><br />
1. 配置listfile.txt文件,格式为file# name</p>
<pre class="brush: bash; title: ; notranslate">
1 H:\BaiduNetdisk\kingdee\system01.dbf
5 H:\BaiduNetdisk\kingdee\EAS_D_EAS_STANDARD.ORA
</pre>
<p>2. 启动obet,执行open listfile.txt(如果不在obet目录提供完整路径)</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; open listfile.txt
Loaded 2 files from config file 'listfile.txt'.

OBET&gt; info

Loaded files (2 total):
----------------------------------------
Number  Path
----------------------------------------
     1  H:\BaiduNetdisk\kingdee\system01.dbf
     5  H:\BaiduNetdisk\kingdee\EAS_D_EAS_STANDARD.ORA
----------------------------------------
</pre>
<p>3. 执行dbv命令(logfile <file> 部分为可选),默认会记录日志在obet目录下面dbv_年月日时分秒.log的日志</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; 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:58
file 1, block 0: checksum error (expected 0xC4DA, got 0xC478), bad block
file 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 error
Verifying 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 block
file 5, block 277679: rdba error (expected 277679, got 277615), bad block
file 5, block 277680: rdba error (expected 277680, got 277616), bad block
file 5, block 277681: rdba error (expected 277681, got 277617), bad block
………………
file 5, block 277692: rdba error (expected 277692, got 277628), bad block
file 5, block 277693: rdba error (expected 277693, got 277629), bad block
file 5, block 277694: rdba error (expected 277694, got 277630), bad block
file 5, block 279406: tailchk error (expected 0x02281E22, got 0x00000700), bad block
file 5, block 279407: rdba error (expected 279407, got 448), bad block
file 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 block
file 5, block 312933: rdba error (expected 312933, got 312869), bad block
file 5, block 312934: rdba error (expected 312934, got 312870), bad block
file 5, block 312935: rdba error (expected 312935, got 312871), bad block
file 5, block 312936: rdba error (expected 312936, got 312872), bad block
file 5, block 312937: rdba error (expected 312937, got 312873), bad block
file 5, block 312938: rdba error (expected 312938, got 312874), bad block
file 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: 4325872
Total all zero blocks found: 1
Total all rdba error blocks found: 255
Total all tailchk error blocks found: 13
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 3
Total bad blocks found: 272
===============================================

Detailed report saved to: dbv_20260111180358.log

OBET&gt;
</pre>
<p>检测效果截图<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/obet-dbv.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/obet-dbv.png" alt="obet-dbv" width="829" height="904" class="alignleft size-full wp-image-11915" /></a><br />
<hr />
obet工具下载地址:<a href="https://www.xifenfei.com/wp-content/uploads/recover_check/obet.zip">obet下载</a><br />
obet工具使用说明:<a href="https://www.xifenfei.com/wp-content/uploads/recover_check/obet.zip">obet使用说明</a></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/wman-recovery.html" rel="bookmark" class="crp_title">年前几例Oracle数据库被加密为.wman的数据库故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obetdbv.html" rel="bookmark" class="crp_title">obet dbv功能完整说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.html" rel="bookmark" class="crp_title">记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html" rel="bookmark" class="crp_title">通过obet 恢复system坏块,打开数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/patch_blk.html" rel="bookmark" class="crp_title">Oracle坏块修复工具:Patch_blk</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/07/dbv-00600-21-5-0-0.html" rel="bookmark" class="crp_title">DBV-00600: 致命错误 &#8211; [21] [5] [0] [0] 错误原因</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/obet-csc-higher-than-block-scn.html" rel="bookmark" class="crp_title">obet修复csc higher than block scn类型坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/sap-oracle-recovery.html" rel="bookmark" class="crp_title">分享一例运行在aix上的sap系统数据库恢复过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/03/bitcoin-interval-encryption.html" rel="bookmark" class="crp_title">比特币加密勒索间隔加密</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/09/obet-repair-oracle-block.html" rel="bookmark" class="crp_title">obet快速修复oracle 位图损坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-miss-archivelog-recovery.html" rel="bookmark" class="crp_title">obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html" rel="bookmark" class="crp_title">几乎动用了所有手段的Oracle故障恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/01/obet-dbv.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
