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

<channel>
	<title>惜分飞</title>
	<atom:link href="https://www.xifenfei.com/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>Sat, 22 Aug 2026 14:28:54 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<itunes:explicit>yes</itunes:explicit><copyright>xienfei.com</copyright><itunes:keywords>www,xifenfei,com基于Oracle、Mysql等数据库知识共享平台</itunes:keywords><itunes:subtitle>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Podcasting"/></itunes:category><itunes:author>惜分飞</itunes:author><itunes:owner><itunes:email>惜分飞</itunes:email><itunes:name>惜分飞</itunes:name></itunes:owner><xhtml:meta content="noindex" name="robots" xmlns:xhtml="http://www.w3.org/1999/xhtml"/><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>
		
				<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/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><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/02/inputoutput-error-recovery.html" rel="bookmark" class="crp_title">Input/output error故障恢复</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>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></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>
		
				<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/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/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/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/2013/02/table%e4%b8%ad%e5%90%84%e7%a7%8d%e5%9d%8f%e5%9d%97%e5%af%b9selectdml%e6%93%8d%e4%bd%9c%e5%bd%b1%e5%93%8d.html" rel="bookmark" class="crp_title">table中各种坏块对select/dml操作影响</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/06/os-error-oracle-recovery.html" rel="bookmark" class="crp_title">系统故障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>
		<dc:creator>惜分飞 (惜分飞)</dc:creator><enclosure length="431650" type="application/zip" url="https://www.xifenfei.com/wp-content/uploads/recover_check/obet.zip"/><itunes:explicit>yes</itunes:explicit><itunes:subtitle>联系：手机/微信(+86 17813235971) QQ(107644445) &amp;#8230; 继续阅读 &amp;#8594;</itunes:subtitle><itunes:author>惜分飞</itunes:author><itunes:summary>联系：手机/微信(+86 17813235971) QQ(107644445) &amp;#8230; 继续阅读 &amp;#8594;</itunes:summary><itunes:keywords>www,xifenfei,com基于Oracle、Mysql等数据库知识共享平台</itunes:keywords></item>
		<item>
		<title>分享一例运行在aix上的sap系统数据库恢复过程</title>
		<link>https://www.xifenfei.com/2026/08/sap-oracle-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/08/sap-oracle-recovery.html#comments</comments>
		<pubDate>Fri, 14 Aug 2026 15:49:53 +0000</pubDate>
		
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[obet bbed]]></category>
		<category><![CDATA[oracle文件头损坏恢复]]></category>
		<category><![CDATA[sap oracle恢复]]></category>
		<category><![CDATA[sap数据库恢复]]></category>
		<category><![CDATA[v7000 lun丢失]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12294</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/08/sap-oracle-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/sap-oracle-recovery.html" target="_blank">分享一例运行在aix上的sap系统数据库恢复过程</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p><strong>情况描述</strong><br />
客户sap系统运行在aix系统,ibm v7000存储上,数据存放在三个1T的lun组成的vg的多个lv中.异常断电之后,但是给数据库使用的三个lun丢失了2个,从而使得所有vg/lv异常,通过硬件恢复出来异常的2个lun和剩余的1个lun一起,把所有的数据文件恢复出来.但是由于某种原因,出现部分block被覆盖(其中还包括两个文件头损坏).<br />
<br />
<strong>坏块检测</strong><br />
对于恢复的所有文件,为了快速做一遍坏块检查,直接在恢复的win机器上使用过obet做了一次dbv检查<a href="https://www.xifenfei.com/2026/01/obet-dbv.html" title="obet实现对数据文件坏块检测功能" rel="noopener" target="_blank">obet实现对数据文件坏块检测功能</a>(使用obet的dbv检查有几个好处:1>可以在win上面检测aix的数据文件;2>可以检测数据文件头损坏的数据文件其他block;3>检测速度比原生dbv快[每个文件内部加了并行检测]),检测结果如下</p>
<pre class="brush: bash; title: ; notranslate">
--其中两个文件头损坏
File #62: E:\sr3_54\sr3.data54 (1280000 blocks) - Started: 2026-07-28 23:57:53
File #62: rfile=0 (0x00000000)  header_block_num=0 (0x00000000)  filesize_status:NO
file 62, block 0: block all zero
file 62, block 1: block all zero

File #84: E:\sr3_76\sr3.data76 (4185601 blocks) - Started: 2026-07-29 00:55:32
File #84: rfile=638937491 (0x26156993)  header_block_num=77152556 (0x0499412C)  filesize_status:NO
file 84, block 1: rdba error (expected 1, got 69760), bad block
file 84, block 2: rdba error (expected 2, got 589836), bad block

--坏块汇总
DBV completed at: 2026-07-29 00:58:10
===============================================
DBV Summary:
Total blocks checked: 196287237
Total all zero blocks found: 337417
Total all rdba error blocks found: 1062468
Total all tailchk error blocks found: 1
Total all soft corrupted blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 1399886
Execution time: 10507.00 seconds
===============================================
</pre>
<p>这个统计下来好的block在99.3%左右,证明硬件层面的会效果已经非常好.<br />
<br />
<strong>碎片工具进一步恢复</strong><br />
恢复公司文件系统层面恢复有数据块遗漏的可能,通过碎片工具(<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.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/orascan.png" alt="orascan" width="1172" height="633" class="alignnone size-full wp-image-12295" /></a><br />
<hr />
通过确认62号文件还有少量block可以进一步恢复（也就是说碎片扫描到的62号文件的block多于硬件公司恢复出来的62号文件里面好的block数量）,通过obet的merge功能进行填补<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/obet-merge.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/obet-merge.png" alt="obet-merge" width="1535" height="944" class="alignnone size-full wp-image-12296" /></a><br />
<hr />
基于上述操作,对于lun里面的数据文件实现了最大效果恢复.<br />
<br />
<strong>数据库恢复操作</strong><br />
1. 上次恢复文件到aix,offline掉异常文件头数据文件打开数据库</p>
<pre class="brush: sql; title: ; notranslate">
sapprd2:oraprd 8&gt; sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Aug 3 18:41:28 2026

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
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; select status from v$instance;

STATUS
------------------------------------
STARTED

SQL&gt; alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00214: control file '/oracle/PRD/origlogA/cntrl/cntrlPRD.dbf' version
9742943 inconsistent with file '/oracle/PRD/sapdata1/cntrl/cntrlPRD.dbf'
version 9742931
</pre>
<p>解决ctl不一致问题之后继续mount库恢复</p>
<pre class="brush: sql; title: ; notranslate">
sapprd2:oraprd 11&gt; sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Aug 3 18:42:53 2026

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
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; alter database mount;

Database altered.

SQL&gt; alter database datafile 62,84 offline;

Database altered.

SQL&gt; recover database ;
Media recovery complete.
SQL&gt; alter database open;

Database altered.
</pre>
<p>2.对于两个损坏的数据文件头进行修复<br />
由于现在aix环境的客户比较少,obet没有在aix环境下进行编译,因此直接使用bbed工具进行文件头修复（列举了主要操作过程）</p>
<pre class="brush: bash; title: ; notranslate">
BBED&gt; copy file 83 block 1 to file 84 block 1
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:    0 to   31           Dba:0x15000001
------------------------------------------------------------------------
 0ba20000 14c00001 00000000 00000104 22250000 00000000 0b200000 72bc991d

 &lt;32 bytes per line&gt;

BBED&gt; set offset 368
        OFFSET          368

BBED&gt; d
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:  368 to  399           Dba:0x15000001
------------------------------------------------------------------------
 00000053 00000000 00000000 495dc097 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;

BBED&gt; m /x 00000054
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:  368 to  399           Dba:0x15000001
------------------------------------------------------------------------
 00000054 00000000 00000000 495dc097 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;

BBED&gt; set offset 52
        OFFSET          52

BBED&gt; d
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:   52 to   83           Dba:0x15000001
------------------------------------------------------------------------
 00530003 00000000 00000000 00000000 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;

BBED&gt; m /x 0054
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:   52 to   83           Dba:0x15000001
------------------------------------------------------------------------
 00540003 00000000 00000000 00000000 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;

BBED&gt; set offset 4
        OFFSET          4

BBED&gt; d
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:    4 to   35           Dba:0x15000001
------------------------------------------------------------------------
 14c00001 00000000 00000104 22250000 00000000 0b200000 72bc991d 50524400

 &lt;32 bytes per line&gt;

BBED&gt; m /x 15000001
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:    4 to   35           Dba:0x15000001
------------------------------------------------------------------------
 15000001 00000000 00000104 22250000 00000000 0b200000 72bc991d 50524400

 &lt;32 bytes per line&gt;


BBED&gt; m /x E1B0
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:  100 to  611           Dba:0x15000001
------------------------------------------------------------------------
 e1b0853f 00040000 4083fcfe 33606b63 02502452 0000ca28 49680fb3 93b9f6b9

 &lt;32 bytes per line&gt;

BBED&gt; set offset +2
        OFFSET          102

BBED&gt; m /x 8542
 File: /oracle/PRD/sapdata3/sr3_76/sr3.data76 (84)
 Block: 1                Offsets:  102 to  613           Dba:0x15000001
------------------------------------------------------------------------
 85420004 00004083 fcfe3360 6b630250 24520000 ca284968 0fb393b9 f6b90005

 &lt;32 bytes per line&gt;


BBED&gt; sum
Check value for File 84, Block 1:
current = 0x2225, required = 0x23e5

BBED&gt; sum apply
Check value for File 84, Block 1:
current = 0x23e5, required = 0x23e5

BBED&gt; verify
DBVERIFY - Verification starting
FILE = /oracle/PRD/sapdata3/sr3_76/sr3.data76
BLOCK = 1


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
Message 531 not found;  product=RDBMS; facility=BBED
</pre>
<p>修改完成之后,还出现过几个错误</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database open ;
alter database open
*
ERROR at line 1:
ORA-01122: database file 62 failed verification check
ORA-01110: data file 62: '/oracle/PRD/sapdata2/sr3_54/sr3.data54'
ORA-01200: actual file size of 1279999 is smaller than correct size of 1280000
</pre>
<p>ORA-01200是由于数据文件比文件头记录信息小一个block,通过补上这个block解决</p>
<pre class="brush: bash; title: ; notranslate">
Read of datafile '/oracle/PRD/sapdata2/sr3_54/sr3.data54' (fno 62) header failed with ORA-01202
Rereading datafile 62 header failed with ORA-01202
Errors in file /oracle/PRD/saptrace/diag/rdbms/prd/PRD/trace/PRD_ora_11272278.trc:
ORA-01122: database file 62 failed verification check
ORA-01110: data file 62: '/oracle/PRD/sapdata2/sr3_54/sr3.data54'
ORA-01202: wrong incarnation of this file - wrong creation time
</pre>
<p>ORA-01202是由于create time没有修改正确导致,重新修改解决</p>
<pre class="brush: bash; title: ; notranslate">
Rereading datafile 84 header failed with ORA-01203
Errors in file /oracle/PRD/saptrace/diag/rdbms/prd/PRD/trace/PRD_ora_17105252.trc:
ORA-01122: database file 84 failed verification check
ORA-01110: data file 84: '/oracle/PRD/sapdata3/sr3_76/sr3.data76'
ORA-01203: wrong incarnation of this file - wrong creation SCN
</pre>
<p>ORA-01203是由于create scn没有修改正确导致,重新修改解决</p>
<pre class="brush: bash; title: ; notranslate">
Errors in file /oracle/PRD/saptrace/diag/rdbms/prd/PRD/trace/PRD_ora_17105278.trc:
ORA-01122: database file 62 failed verification check
ORA-01110: data file 62: '/oracle/PRD/sapdata2/sr3_54/sr3.data54'
ORA-01207: file is more recent than control file - old control file
ORA-1122 signalled during: alter database open .
</pre>
<p>ORA-01207是由于数据文件的ckp信息比控制文件的新,重建ctl解决,解决这些问题之后,顺利打开数据库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; startup mount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 3.7548E+10 bytes
Fixed Size                  2254136 bytes
Variable Size            1.9193E+10 bytes
Database Buffers         1.8254E+10 bytes
Redo Buffers               98996224 bytes
Database mounted.
SQL&gt; alter database open;

Database altered.

SQL&gt; select status,count(1) from v$datafile_header group by status;

STATUS    COUNT(1)
------- ----------
ONLINE          84
</pre>
<p>然后跳过坏块,导出数据,对于无法导出的异常表进行特殊处理,完成本次恢复工作,最终恢复结果总结<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/08/all.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/08/all.png" alt="all" width="739" height="334" class="alignnone size-full wp-image-12297" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/dd%e6%93%8d%e4%bd%9c%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">dd操作数据文件</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/2011/12/%e5%9c%a8ultraedit%e4%b8%ad%e5%ae%9a%e4%bd%8d%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e5%86%85%e5%ae%b9.html" rel="bookmark" class="crp_title">在UltraEdit中定位数据文件内容</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/03/bbed-recovery-corrupted-block.html" rel="bookmark" class="crp_title">file 1 block 128 corrupted/坏块恢复&#8212;system rollback坏块修复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/bbed-%e5%88%a0%e9%99%a4-cluster-table-%e8%ae%b0%e5%bd%95.html" rel="bookmark" class="crp_title">bbed 删除 cluster table 记录</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/%e5%88%a9%e7%94%a8bbed%e6%89%be%e5%9b%9ebbed%e6%9b%b4%e6%96%b0%e5%89%8d%e5%80%bc.html" rel="bookmark" class="crp_title">利用bbed找回ORACLE更新前值</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e7%b3%bb%e7%bb%9f%e4%b8%ad%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97%e5%92%8coracle-%e4%b8%ad%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97.html" rel="bookmark" class="crp_title">系统中数据文件第一个数据块和oracle 中第一个数据块关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/09/%e6%a8%a1%e6%8b%9f%e6%99%ae%e9%80%9aora-08103%e5%b9%b6%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">模拟普通ORA-08103并解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/09/bbed-ora-1578.html" rel="bookmark" class="crp_title">bbed解决ORA-01578</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/08/ora-600-krhpfh_03-1210.html" rel="bookmark" class="crp_title">ORA-600 krhpfh_03-1210故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/09/ora-01122-ora-01210-%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORA-01122 ORA-01210 故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8bbed%e4%bf%ae%e5%a4%8d%e6%8d%9f%e5%9d%8fdatafile-header.html" rel="bookmark" class="crp_title">使用bbed修复损坏datafile header</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/08/sap-oracle-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>OBET-Oracle Block Editor Tool使用说明</title>
		<link>https://www.xifenfei.com/2026/08/obet-oracle-block-editor-tool.html</link>
		<comments>https://www.xifenfei.com/2026/08/obet-oracle-block-editor-tool.html#comments</comments>
		<pubDate>Thu, 13 Aug 2026 13:49:23 +0000</pubDate>
		
				<category><![CDATA[小工具]]></category>
		<category><![CDATA[obet]]></category>
		<category><![CDATA[obet使用说明]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12292</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/08/obet-oracle-block-editor-tool.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-oracle-block-editor-tool.html" target="_blank">OBET-Oracle Block Editor Tool使用说明</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<h2 id="intro" style="color: #1f2328;">1. 概述</h2>
<p style="color: #1f2328;">OBET 以 REPL 交互模式工作：启动后进入 <code style="color: #cf222e;">OBET&gt;</code> 提示符，逐条执行命令。文件以 <em>文件号 + 块号</em> 的方式定位，可同时维护一份文件列表（来自 <code style="color: #cf222e;">listfile.txt</code>），方便在不同数据文件之间交叉读写。</p>
<h3 style="color: #0969da;">功能概览</h3>
<ul style="color: #1f2328;">
<li>十六进制查看 / 编辑数据块（自动维护 tailchk 和 checksum）</li>
<li>打印 Oracle 内部结构（<code style="color: #cf222e;">kcbh</code> / <code style="color: #cf222e;">kcvfh*</code> / <code style="color: #cf222e;">tailchk</code>）</li>
<li>跨数据文件拷贝块 / 字节范围 / 文件头 SCN 信息</li>
<li>整文件强制拷贝（<code style="color: #cf222e;">forcecopy</code>，绕过坏块）</li>
<li>扩展数据文件（<code style="color: #cf222e;">extend file N</code>，按文件头记录大小补齐零块）</li>
<li>坏块修复：<code style="color: #cf222e;">corrupt</code> / <code style="color: #cf222e;">repair block</code> / <code style="color: #cf222e;">repair blkscn</code> / <code style="color: #cf222e;">merge</code></li>
<li><code style="color: #cf222e;">dbv</code> 数据块物理一致性扫描（可指定文件/起始块/块数）</li>
<li>导出 / 解析数据库元数据：<code style="color: #cf222e;">get_dhr</code> / <code style="color: #cf222e;">parse_ctl</code> / <code style="color: #cf222e;">dump_undo</code></li>
<li>解析 RDBA 编码（<code style="color: #cf222e;">rdba</code> / <code style="color: #cf222e;">getrdba</code>）</li>
<li>构造 Oracle 数据块（<code style="color: #cf222e;">build block N,M</code>）</li>
<li>Linux 下 Patch Oracle 进程 SCN（<code style="color: #cf222e;">patch_scn</code>）</li>
</ul>
<div class="note" style="color: #1f2328;"><strong>授权说明</strong>写操作（<code style="color: #cf222e;">modify / corrupt / repair / copy / merge / forcecopy / extend / patch_scn</code> 等需要修改磁盘内容的命令）需要先 <code style="color: #cf222e;">set mode edit</code> 进入编辑模式，并在出现确认提示时输入 <code style="color: #cf222e;">Y</code> 或 <code style="color: #cf222e;">YES</code> 才会执行写入。 <code style="color: #cf222e;">backup</code> 仅复制块到本地目录，不需授权。未授权时仅允许只读命令。</div>
<h2 id="developer" style="color: #1f2328;">2. 开发者信息</h2>
<table style="color: #1f2328;">
<tbody>
<tr>
<th>姓名</th>
<td>XiFenFei</td>
</tr>
<tr>
<th>电话</th>
<td>+86-17813235971</td>
</tr>
<tr>
<th>邮箱</th>
<td>dba@xifenfei</td>
</tr>
<tr>
<th>QQ</th>
<td>107644445</td>
</tr>
<tr>
<th>微信</th>
<td>17813235971</td>
</tr>
<tr>
<th>网站</th>
<td><a href="https://www.xifenfei.com/">https://www.xifenfei.com</a></td>
</tr>
</tbody>
</table>
<p style="color: #1f2328;">反馈授权 / Bug / 功能建议可通过上述任一渠道联系。</p>
<h2 id="startup" style="color: #1f2328;">3. 启动与会话</h2>
<h3 id="cmd-help" style="color: #0969da;">3.1 help</h3>
<p style="color: #1f2328;">显示完整命令清单（与本手册对应的内嵌帮助）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; help

  [File / Block Setup]
  open          - Load file list (format:  )
  info                    - Show loaded file list
  set       - Configure: filename|file |blocksize|block|offset|count|mode|endian
  show                    - Display current settings
  listfile &lt;path|remove|edit&gt;  - Scan dir (path), remove, or edit listfile.txt (notepad/vi)

  [View Data]
  d/dump [file N] [block X] [offset Y] [count Z] - Display block data (default: current file/block)
  p/print &lt;kcvfh[.field]|tailchk&gt;  - Print Oracle structure (use 'p' alone for full list)

  [Verify / Calculate]
  sum [apply] [file N] [block X]       - Verify (or apply) block checksum
  tailchk [apply] [file N] [block X]   - Verify (or apply) block tailchk
  dbv [file N [block M [blocks X]]]    - Verify data blocks for corruption

  [Modify Data]
  m/modify  [file N] [block X] [offset Y]  - Modify bytes (with auto-checksum/tailchk)
  corrupt [file N] [block X]          - Mark block as corrupted
  backup [file N] [block X]           - Backup block to backup_blk/
  undo                                - Undo last modification

  [Repair]
  repair block [file N] [block X]         - Fix seq_kcbh / tailchk / checksum
  repair blkscn [file N] [block X]        - Fix block SCN lower than block CSC
  copy data  to               - Copy byte range between files
    / format: file[,block][,offset[,count]]
    Example: copy data 1,1,16,32 to 2,5,16
  copy block &lt;file,block&gt; to &lt;file,block&gt;  - Copy entire block between files
  copy chkscn file N to file M            - Copy datafile header checkpoint SCN info
  copy resetlogscn file N to file M       - Copy datafile header resetlogs info
  forcecopy file N to               - Force copy file ignoring bad blocks (damaged disks)
  extend file N                          - Check and extend datafile to match header record
  merge file N from M                    - Repair N's bad blocks using M's blocks at same RDBA
  build block N,M [to file X]           - Build block (N=file#, M=block#); write build_N_M.blk; 'to file X' patch after validation

  [Database Info / Diagnostics]
  get_dhr                - Extract DB info from file headers to dhr_*.txt
  parse_ctl        - Parse Oracle control file (DB name / datafiles / tablespaces)
  rdba              - Parse RDBA value to File# and Block# (e.g., rdba 0xFEDCBA12)
  getrdba &lt;rfile#&gt; &lt;block#&gt; - Calculate RDBA from rfile# and block# (e.g., getrdba 1 500)
  dump_undo [file N] [block M] - Dump UNDO$ segment: name + status$ (default: file 1 block 224)

  [Session]
  license              - Show / manage license
  version              - Show version and developer info
  spool |off    - Start/stop logging to file
  help                 - Show this help message
  quit/exit            - Exit OBET</code></pre>
<h3 id="cmd-version" style="color: #0969da;">3.2 version</h3>
<p style="color: #1f2328;">显示 OBET 版本、构建时间、开发者信息。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; version
=============================================
Welcome to Oracle Block Editor Tool (OBET)
=============================================
***** !!! For Oracle Internal Use only !!! *****

[Software Function Description]
- View and edit data block in hexadecimal format
- Print Oracle internal structures (kcbh / kcvfh* / tailchk)
- Modify data block bytes (with auto tailchk/checksum)
- Copy block / data between different datafiles
- Copy / repair datafile header SCN info (copy chkscn/resetlogscn)
- Force copy entire file ignoring bad blocks (forcecopy)
- Extend datafile to expected size from file header (extend)
- Mark data block as corrupted block
- Verify data blocks for corruption (dbv)
- Repair corrupted block / Repair block SCN
- Calculate and verify tailchk / checksum
- Backup data block to backup_blk/ directory
- Repair bad blocks using healthy donor file (merge)
- Extract undo$ segment contents (dump_undo)
- Extract database info from file headers (get_dhr)
- Parse Oracle control file (parse_ctl)
- Parse RDBA value to Oracle File# and Block#
- Patch Oracle process SCN in memory (patch_scn, Linux only)
- Scan directory to listfile.txt (listfile)

[Developer Information]
- Name: XiFenFei
- Phone: +86-17813235971
- Email: dba@xifenfei
- Q Q: 107644445
- WeChat: 17813235971
- Website: https://www.xifenfei.com

[Version Details]
- Software Version: 2026.08
- Build Date: 2026.08.12 17:49:27</code></pre>
<h3 id="cmd-quit" style="color: #0969da;">3.3 quit / exit</h3>
<p style="color: #1f2328;">退出 OBET。</p>
<h2 id="setup" style="color: #1f2328;">4. 文件 / 块设置</h2>
<p style="color: #1f2328;">这一组命令负责把磁盘上的数据文件加载到 OBET 上下文。所有读写命令都依赖当前的 <em>filename</em>、<em>blocksize</em>、<em>block</em>、<em>offset</em>、<em>count</em>、<em>endian</em> 等参数。</p>
<h3 id="cmd-open" style="color: #0969da;">4.1 open &lt;listfile&gt;</h3>
<p style="color: #1f2328;">从指定文件加载文件列表。文件每行格式：<code style="color: #cf222e;">&lt;num&gt; &lt;path&gt;</code>，<code style="color: #cf222e;">num</code> 是 OBET 内部文件号，供后续 <code style="color: #cf222e;">set file N</code> / <code style="color: #cf222e;">file N</code> 使用。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; open listfile.txt</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; open test_listfile.txt
Loaded 1 files from datafile list 'test_listfile.txt'.</code></pre>
<h3 id="cmd-info" style="color: #0969da;">4.2 info</h3>
<p style="color: #1f2328;">显示当前已加载的文件列表（编号 / 路径）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; info
----------------------------------------
No   Path
----------------------------------------
1    E:/CC/obet/dbf/SYSTEM01.DBF
----------------------------------------</code></pre>
<h3 id="cmd-set" style="color: #0969da;">4.3 set &lt;param&gt; &lt;value&gt;</h3>
<p style="color: #1f2328;">设置上下文参数。可用参数：</p>
<table style="color: #1f2328;">
<tbody>
<tr>
<th>参数</th>
<th>取值</th>
<th>说明</th>
</tr>
<tr>
<td><code style="color: #cf222e;">filename</code></td>
<td>文件路径</td>
<td>当前操作的目标文件</td>
</tr>
<tr>
<td><code style="color: #cf222e;">file</code></td>
<td>整数 N</td>
<td>切换到已加载列表中第 N 个文件</td>
</tr>
<tr>
<td><code style="color: #cf222e;">blocksize</code></td>
<td>2048 / 4096 / 8192 / 16384 / 32768</td>
<td>Oracle 块大小</td>
</tr>
<tr>
<td><code style="color: #cf222e;">block</code></td>
<td>整数</td>
<td>当前块号</td>
</tr>
<tr>
<td><code style="color: #cf222e;">offset</code></td>
<td>整数（块内偏移）</td>
<td>块内起始偏移</td>
</tr>
<tr>
<td><code style="color: #cf222e;">count</code></td>
<td>整数</td>
<td>dump/modify 的字节数</td>
</tr>
<tr>
<td><code style="color: #cf222e;">mode</code></td>
<td><code style="color: #cf222e;">browse</code> / <code style="color: #cf222e;">edit</code></td>
<td>交互模式（默认 browse）</td>
</tr>
<tr>
<td><code style="color: #cf222e;">endian</code></td>
<td><code style="color: #cf222e;">big</code> / <code style="color: #cf222e;">little</code></td>
<td>多字节字段字节序</td>
</tr>
</tbody>
</table>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set filename /u01/oradata/users01.dbf
OBET&gt; set blocksize 8192
OBET&gt; set block 100
OBET&gt; set endian big</code></pre>
<h3 id="cmd-show" style="color: #0969da;">4.4 show</h3>
<p style="color: #1f2328;">显示当前上下文所有参数，包括 <code style="color: #cf222e;">Mode</code>（<code style="color: #cf222e;">browse</code> / <code style="color: #cf222e;">edit</code>）、<code style="color: #cf222e;">Filename</code>、<code style="color: #cf222e;">File#</code>、<code style="color: #cf222e;">Block#</code>、<code style="color: #cf222e;">Blocksize</code>、<code style="color: #cf222e;">Offset</code>、<code style="color: #cf222e;">Count</code>、<code style="color: #cf222e;">Endian</code> 等。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">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: 1 (use 'info' to list)</code></pre>
<h3 id="cmd-listfile" style="color: #0969da;">4.5 listfile &lt;path | remove | edit&gt;</h3>
<p style="color: #1f2328;">扫描目录生成 <code style="color: #cf222e;">listfile.txt</code>、清空或编辑。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; listfile /u01/oradata
OBET&gt; listfile edit
OBET&gt; listfile remove</code></pre>
<ul style="color: #1f2328;">
<li><code style="color: #cf222e;">listfile &lt;path&gt;</code>：递归扫描目录，支持通配符 <code style="color: #cf222e;">*</code>，结果追加写入当前目录的 <code style="color: #cf222e;">listfile.txt</code></li>
<li><code style="color: #cf222e;">listfile remove</code>：删除当前目录的 <code style="color: #cf222e;">listfile.txt</code></li>
<li><code style="color: #cf222e;">listfile edit [path]</code>：调用系统编辑器（Windows 记事本 / Linux <code style="color: #cf222e;">vi</code>）打开 <code style="color: #cf222e;">listfile.txt</code>，可指定路径</li>
</ul>
<p style="color: #1f2328;"><strong>通配符示例：</strong></p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; listfile E:/oradata           # 扫描整个目录
OBET&gt; listfile E:/dbf/system*.dbf  # 仅扫描名称以 system 开头且 .dbf 结尾的数据文件</code></pre>
<p style="color: #1f2328;">已存在 <code style="color: #cf222e;">listfile.txt</code> 时，新扫描结果以递增编号追加写入。</p>
<div class="warn" style="color: #7d4e00;"><strong>写操作保护</strong>写盘时会校验输入，避免路径穿越（<code style="color: #cf222e;">../</code>、<code style="color: #cf222e;">..\</code>）。</div>
<h2 id="view" style="color: #1f2328;">5. 查看数据</h2>
<h3 id="cmd-dump" style="color: #0969da;">5.1 dump / d [file N] [block X] [offset Y] [count Z]</h3>
<p style="color: #1f2328;">以十六进制 + ASCII 形式显示块数据。默认使用当前文件 / 块 / 偏移，也可直接通过参数指定。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; d
OBET&gt; dump file 1 block 100
OBET&gt; dump offset 16 count 64
OBET&gt; dump file 2 block 5 offset 0 count 128</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; dump file 1 block 128 offset 32 count 48
File: e:/cc/obet/dbf/system01.dbf (#1 in listfile)
Block: 128                Offsets:    32 to    79
--------------------------------------------------------------------------------
00100020 00000000 01000200 00000000 04001200 43000000 B02C8000 2F001000 01200000
00100040 22120200 00015800 FFFFC200 2A046803</code></pre>
<h3 id="cmd-print" style="color: #0969da;">5.2 print / p &lt;kcvfh[.field] | tailchk&gt;</h3>
<p style="color: #1f2328;">解析并打印 Oracle 内部结构。仅支持一级字段。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; p kcvfh
OBET&gt; p kcvfh.kcvfhhdr
OBET&gt; p kcvfh.kcvfhckp
OBET&gt; p tailchk
ub4 tailchk                                      @8188    0x00000B01</code></pre>
<p style="color: #1f2328;">支持的全部结构字段（<code style="color: #cf222e;">p</code> 不带参数可打印完整清单）：</p>
<table style="color: #1f2328;">
<tbody>
<tr>
<th>字段</th>
<th>含义</th>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhhdr</code></td>
<td>文件头描述符</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhrfn</code></td>
<td>相对文件号</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhrdb</code></td>
<td>DBID</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhcrs</code></td>
<td>创建 SCN</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhcrt</code></td>
<td>创建时间</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhrls</code></td>
<td>Resetlogs SCN</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhcrs</code></td>
<td>Creation SCN</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbsc</code></td>
<td>Backup SCN</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbti</code></td>
<td>Backup table info</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbth</code></td>
<td>Backup table header</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbcp</code></td>
<td>Backup Checkpoint</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbhz</code></td>
<td>Backup status</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhccc</code></td>
<td>Change count</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhckp</code></td>
<td>完整 Checkpoint</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhcpc</code></td>
<td>Checkpoint count</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhprs</code> / <code style="color: #cf222e;">kcvfhprc</code> / <code style="color: #cf222e;">kcvfhprfs</code> / <code style="color: #cf222e;">kcvfhrfs</code></td>
<td>恢复相关字段</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhtsn</code> / <code style="color: #cf222e;">kcvfhtln</code> / <code style="color: #cf222e;">kcvfhtnm</code></td>
<td>表空间号 / 名长度 / 名</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhrlc</code> / <code style="color: #cf222e;">kcvfhrts</code> / <code style="color: #cf222e;">kcvfhtrt</code></td>
<td>Resetlogs 计数 / 时间戳 / 总复位次数</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhxcd</code></td>
<td>扩展 Checkpoint</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhsta</code></td>
<td>Fuzzy 状态</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhofb</code> / <code style="color: #cf222e;">kcvfhnfb</code></td>
<td>Offset bytes / Next offset bytes</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhbfh</code></td>
<td>Backup file header block</td>
</tr>
<tr>
<td><code style="color: #cf222e;">kcvfhafs</code></td>
<td>Auxiliary recovery</td>
</tr>
<tr>
<td><code style="color: #cf222e;">tailchk</code></td>
<td>块尾校验</td>
</tr>
</tbody>
</table>
<div class="note" style="color: #1f2328;">仅支持一级结构访问，如 <code style="color: #cf222e;">p kcvfh.kcvfhhdr</code>，不支持 <code style="color: #cf222e;">p kcvfh.kcvfhhdr.kccfhtyp</code>。</div>
<h2 id="verify" style="color: #1f2328;">6. 校验 / 计算</h2>
<h3 id="cmd-sum" style="color: #0969da;">6.1 sum [apply] [file N] [block X]</h3>
<p style="color: #1f2328;">校验或修复 <em>checksum</em>（块头 <code style="color: #cf222e;">kcbh</code> 中的 <code style="color: #cf222e;">kcbh.flags</code>/<code style="color: #cf222e;">kcbh.checksum</code> 字段）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; sum
OBET&gt; sum apply
OBET&gt; sum file 2
OBET&gt; sum apply file 2 block 100</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; sum
Check value for File e:\cc\obet\dbf\system01.dbf, Block 2:
  current = 0xB71C, required = 0xB71C</code></pre>
<h3 id="cmd-tailchk" style="color: #0969da;">6.2 tailchk [apply] [file N] [block X]</h3>
<p style="color: #1f2328;">校验或修复 <em>tailchk</em>（块末 4 字节与起始 SCN 比对）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; tailchk
OBET&gt; tailchk apply
OBET&gt; tailchk apply file 1 block 224</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; tailchk apply file 1 block 224
Confirm applying tailchk:
File: e:\cc\obet\dbf\system01.dbf
Block: 224
Offset in block: 8188 (file offset: 0x00071FFC)
Original value: 0x00E03F03
New value:      0x00E03F03
Confirm? (Y/YES to proceed): Y
tailchk applied successfully.</code></pre>
<h3 id="cmd-dbv" style="color: #0969da;">6.3 dbv [file N [block M [blocks X]]]</h3>
<p style="color: #1f2328;">对全部已加载文件或指定文件做物理一致性扫描（类似 Oracle <code style="color: #cf222e;">dbv</code> 工具）。字节序由 <code style="color: #cf222e;">set endian</code> 控制。可检测五类问题：全零块、软损坏（<code style="color: #cf222e;">seq_kcbh</code>=0xFF）、tailchk 错误、checksum 错误、rdba 错误。</p>
<ul style="color: #1f2328;">
<li><code style="color: #cf222e;">dbv</code>：扫描全部已加载文件（从块 0 到文件末尾）</li>
<li><code style="color: #cf222e;">dbv file N</code>：仅扫描文件 N（从块 0 到文件末尾）</li>
<li><code style="color: #cf222e;">dbv file N block M</code>：扫描文件 N 从块 M 到文件末尾</li>
<li><code style="color: #cf222e;">dbv file N block M blocks X</code>：扫描文件 N 从块 M 起共 X 块；若 M+X 超出文件总块数，则扫描到文件末尾</li>
</ul>
<p style="color: #1f2328;">块号从 0 开始。自动识别 bigfile / smallfile 数据文件，bigfile 时跳过文件头（block 0）的 rdba 校验。扫描结果自动保存到日志文件：</p>
<ul style="color: #1f2328;">
<li><code style="color: #cf222e;">dbv</code> → <code style="color: #cf222e;">dbv_yyyymmddhhmmss.log</code></li>
<li><code style="color: #cf222e;">dbv file N</code> → <code style="color: #cf222e;">dbv_file_N_yyyymmddhhmmss.log</code></li>
<li><code style="color: #cf222e;">dbv file N block M</code> → <code style="color: #cf222e;">dbv_file_N_block_M_yyyymmddhhmmss.log</code></li>
</ul>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; dbv
OBET&gt; dbv file 1
OBET&gt; dbv file 1 block 100
OBET&gt; dbv file 1 block 100 blocks 500</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; dbv file 1 block 100 blocks 500
===============================================
DBV (Data Block Verification)
Block Size: 8192 bytes
Endian:     little-endian (x86)
Target:     file #1 (e:\cc\obet\dbf\system01.dbf)
Range:      block 100 to block 599 (500 blocks)
===============================================
Verifying file #1: e:\cc\obet\dbf\system01.dbf ...
DBV completed at: 2026-08-12 15:04:25
===============================================
DBV Summary:
Total blocks checked: 500
Total all zero blocks found: 0
Total all tailchk error blocks found: 0
Total all checksum error blocks found: 0
Total bad blocks found: 0
Execution time: 0.20 seconds
Throughput: 19.53 MB/s
===============================================
Detailed report saved to: dbv_file_1_block_100_20260812150425.log</code></pre>
<h2 id="modify" style="color: #1f2328;">7. 修改数据</h2>
<h3 id="cmd-modify" style="color: #0969da;">7.1 modify / m &lt;hex&gt; [file N] [block X] [offset Y] <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">写入十六进制字节。写入后<strong>自动重新计算</strong> <code style="color: #cf222e;">tailchk</code> 与 <code style="color: #cf222e;">checksum</code>。需先 <code style="color: #cf222e;">set mode edit</code>，执行时输入 <code style="color: #cf222e;">Y</code> 确认。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set mode edit
OBET&gt; m 41424344
OBET&gt; modify 41424344 file 1 block 100 offset 32</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set mode edit
OBET&gt; modify 41424344 file 1 block 128 offset 32
Confirm modification:
File: e:\cc\obet\dbf\system01.dbf
Block: 128
Offset: 32 (file offset: 0x00040020)
Original value: 01000200
New value:      41424344
Confirm? (Y/YES to proceed): Y
Data written successfully.</code></pre>
<h3 id="cmd-corrupt" style="color: #0969da;">7.2 corrupt [file N] [block X] <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">将指定块标记为 Oracle 意义上的<em>损坏块</em>（破坏 tailchk）。需先 <code style="color: #cf222e;">set mode edit</code>，执行时输入 <code style="color: #cf222e;">Y</code> 确认。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; corrupt file 1 block 128
Confirm marking block 128 as corrupted:
Block 128 current tailchk: 0x00200000
Successfully marked block 128 as corrupted.</code></pre>
<h3 id="cmd-backup" style="color: #0969da;">7.3 backup [file N] [block X]</h3>
<p style="color: #1f2328;">把指定块完整备份到当前目录的 <code style="color: #cf222e;">backup_blk/</code> 子目录。备份文件名格式：<code style="color: #cf222e;">backup_&lt;filename&gt;.&lt;file#&gt;_&lt;block#&gt;_&lt;timestamp&gt;.blk</code></p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; backup file 1 block 128
Backing up file #1, block 128
e:\cc\obet\dbf\system01.dbf
Successfully backed up block 128 to backup_blk\system01.dbf.1_128_20260812150500.blk</code></pre>
<h3 id="cmd-undo" style="color: #0969da;">7.4 undo <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">回滚最近一次 <code style="color: #cf222e;">modify / repair / copy / corrupt</code> 等写操作。OBET 在每次写操作前保留原块内容，回滚基于这份快照。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; undo
Undid 1 operation(s). Block data restored from backup.</code></pre>
<h2 id="repair" style="color: #1f2328;">8. 修复</h2>
<h3 id="cmd-repair" style="color: #0969da;">8.1 repair block / blkscn [file N] [block X] <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<ul style="color: #1f2328;">
<li><code style="color: #cf222e;">repair block</code>：修复 <code style="color: #cf222e;">seq_kcbh</code>、<code style="color: #cf222e;">tailchk</code>、<code style="color: #cf222e;">checksum</code></li>
<li><code style="color: #cf222e;">repair blkscn</code>：把块的 <code style="color: #cf222e;">scn</code> 抬到不低于 <code style="color: #cf222e;">csc</code>（解决 ORA-600 [kdddgb] 之类 <em>block SCN &lt; block CSC</em> 类报错）</li>
</ul>
<p style="color: #1f2328;">均需先 <code style="color: #cf222e;">set mode edit</code>，执行时输入 <code style="color: #cf222e;">Y</code> 确认。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set mode edit
OBET&gt; repair block
OBET&gt; repair block file 2 block 100
OBET&gt; repair blkscn file 1 block 224</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; repair block file 1 block 128
Repairing block 1, 128...
Current block SCN information:
  blkscn: 0x000000000278D9A3 (41663267)
  blkcsc: 0x0000000002790128 (41670952)
blkscn &lt; blkcsc, SCN repair required.
New SCN values to write:
  base:  0x02790128 (41670952)
  wrap:  0x0000
  seq:   0x00
Confirm SCN repair operations: Operation cancelled.</code></pre>
<h3 id="cmd-copy" style="color: #0969da;">8.2 copy <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">多种拷贝语义，全部写盘需授权。</p>
<table style="color: #1f2328;">
<tbody>
<tr>
<th>子命令</th>
<th>语法</th>
<th>说明</th>
</tr>
<tr>
<td><code style="color: #cf222e;">copy data</code></td>
<td><code style="color: #cf222e;">copy data &lt;src&gt; to &lt;dest&gt;</code></td>
<td>跨文件字节范围拷贝</td>
</tr>
<tr>
<td><code style="color: #cf222e;">copy block</code></td>
<td><code style="color: #cf222e;">copy block &lt;file,block&gt; to &lt;file,block&gt;</code></td>
<td>整块拷贝</td>
</tr>
<tr>
<td><code style="color: #cf222e;">copy chkscn</code></td>
<td><code style="color: #cf222e;">copy chkscn file N to file M</code></td>
<td>拷贝数据文件头 Checkpoint SCN 信息</td>
</tr>
<tr>
<td><code style="color: #cf222e;">copy resetlogscn</code></td>
<td><code style="color: #cf222e;">copy resetlogscn file N to file M</code></td>
<td>拷贝 Resetlogs 信息</td>
</tr>
</tbody>
</table>
<p style="color: #1f2328;"><code style="color: #cf222e;">&lt;src&gt;</code> / <code style="color: #cf222e;">&lt;dest&gt;</code> 格式：<code style="color: #cf222e;">file[,block][,offset[,count]]</code>。缺省 block 沿用当前块，缺省 offset = 0，缺省 count = blocksize。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; copy data 1,1,16,32 to 2,5,16
OBET&gt; copy block 1,100 to 2,100
OBET&gt; copy chkscn file 1 to file 2
OBET&gt; copy resetlogscn file 1 to file 2</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; copy block 1,128 to 1,129
Copying block 1,128 to 1,129...
  src: file#=1 block#=128 (rdba=0x00400080)
  dest: file#=1 block#=129 (rdba=0x00400081)
Block copied successfully.</code></pre>
<h3 id="cmd-merge" style="color: #0969da;">8.3 merge file N from M <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">用 <em>M 文件</em>中 RDBA 一致的健康块替换 <em>N 文件</em>中的坏块。执行前 OBET 会要求输入 <code style="color: #cf222e;">YES</code> 二次确认。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; merge file 2 from 3</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; merge file 2 from 3
Merging bad blocks from file 2 using healthy blocks from file 3...
File 2: scanning for bad blocks...
  Block 100: bad, searching donor...
  Block 100: rdba=0x00400064 matched, scanning file 3 for donor block...
  Block 100: donor found at file 3 block 100
  Replacing bad block 100 in file 2 with healthy block from file 3...
Merge completed. Total blocks repaired: 1</code></pre>
<div class="danger" style="color: #82071e;"><strong>不可逆</strong>操作覆盖原文件块，请先 <code style="color: #cf222e;">backup</code>。</div>
<h3 id="cmd-forcecopy" style="color: #0969da;">8.4 forcecopy file N to &lt;path&gt; <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">整文件级别强制拷贝，<strong>忽略坏块</strong>（按 <code style="color: #cf222e;">blocksize</code> 步长逐块读取；坏块读到 0 字节时填充全 0&#215;00 写入目标）。用于磁盘扇区部分损坏但仍能部分读取的应急场景。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; forcecopy file 2 to D:\rescue\users01.dbf</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; forcecopy file 2 to D:\rescue\users01.dbf
forcecopy: source file 2, dest D:\rescue\users01.dbf
Reading source file...
  4096 bytes read OK (block 0)
  4096 bytes read OK (block 1)
  ... (progress every 1000 blocks)
  4182831104 bytes copied (510600 blocks)
forcecopy completed. 0 bad blocks filled with zeros.</code></pre>
<h3 id="cmd-extend" style="color: #0969da;">8.5 extend file N <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">比较 Oracle 数据文件实际大小与文件头记录的预期大小，在不一致时将文件扩展至正确大小（尾部构造 Oracle block 填充）。</p>
<p style="color: #1f2328;"><strong>判定规则</strong>：读取 block 1 内部偏移 44 处的块计数字段，计算出预期大小：</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">预期大小 = (块计数 + 1) × blocksize</code></pre>
<p style="color: #1f2328;">三种结果：</p>
<ul style="color: #1f2328;">
<li><strong>相等</strong>——文件大小与预期一致，无需操作；</li>
<li><strong>预期 &gt; 实际</strong>（文件偏小）——从当前块号起，逐块用构造的 Oracle 空块填充至预期大小（不足一块的尾部按字节填零）；</li>
<li><strong>预期 &lt; 实际</strong>（文件偏大）——输出提示，要求人工介入，不自动截断。</li>
</ul>
<p style="color: #1f2328;"><strong>前提条件</strong>：</p>
<ul style="color: #1f2328;">
<li>需先 <code style="color: #cf222e;">set blocksize</code> 设置正确的 Oracle 块大小（4096 / 8192 / 16384 / 32768）</li>
<li>需先 <code style="color: #cf222e;">set endian big|little</code> 设置正确的字节序</li>
<li>需先 <code style="color: #cf222e;">set mode edit</code> 进入编辑模式</li>
</ul>
<p style="color: #1f2328;">开始写入前需输入 <code style="color: #cf222e;">Y</code> 或 <code style="color: #cf222e;">YES</code> 二次确认（忽略大小写）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set blocksize 8192
OBET&gt; set mode edit
OBET&gt; extend file 1
File #1: E:\dbf\system.dbf
  BlockSize:       8192 bytes
  Header Blocks:   510600 (offset 44)
  Expected Size:   4182835200 bytes ((510600+1)*8192)
  Actual Size:     4182831104 bytes
  Status: File is smaller than header record.
  Extending file by 4096 bytes (Build Oracle block padding)...
  Confirm? (Y/yes to proceed): Y
  Done. File extended to 4182835200 bytes.</code></pre>
<div class="warn" style="color: #7d4e00;"><strong>注意</strong>扩展操作不可逆，请在执行前做好文件备份。若文件实际大小大于预期，Oracle 内部可能已扩展但文件头未更新，请人工核实后处理。</div>
<h3 id="cmd-build" style="color: #0969da;">8.6 build block N,M [to file X] <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">构造 Oracle 数据块（<code style="color: #cf222e;">N</code>=file# 1-1024，<code style="color: #cf222e;">M</code>=block#）并按需 patch 到 listfile 中的目标文件。</p>
<p style="color: #1f2328;"><strong>用法</strong>：</p>
<ul style="color: #1f2328;">
<li><code style="color: #cf222e;">build block N,M</code>——仅在 OBET 当前工作目录生成 <code style="color: #cf222e;">build_N_M.blk</code>（始终生成，无论是否带 <code style="color: #cf222e;">to file X</code>）。</li>
<li><code style="color: #cf222e;">build block N,M to file X</code>——生成 blk 之后，校验通过后将构造好的块覆盖到 listfile X 的 block M。</li>
</ul>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; set endian big
OBET&gt; build block 1,500
Created: build_1_500.blk (file#=1, block#=500, rdba=0x004001F4, tailchk=0x01000000, checksum=0x0113)

OBET&gt; set mode edit
OBET&gt; build block 1,500 to file 1
Created: build_1_500.blk (file#=1, block#=500, rdba=0x004001F4, tailchk=0x01000000, checksum=0x0113)
Confirm patch: File 1 Block 500 (E:\dbf\system.aix-11202)? [Y/YES]: Y
Patched: File 1 Block 500 (E:\dbf\system.aix-11202)</code></pre>
<h2 id="dbinfo" style="color: #1f2328;">9. 数据库诊断</h2>
<h3 id="cmd-get_dhr" style="color: #0969da;">9.1 get_dhr</h3>
<p style="color: #1f2328;">读取当前加载的每个数据文件的 <em>block 1</em>（数据文件头），解析数据库元数据并生成 <em>数据文件头报告</em>（Get Datafile Header Report）。报告同时输出到屏幕，并写入 <code style="color: #cf222e;">dhr_&lt;YYYYMMDD_HHMMSS&gt;.txt</code>。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; get_dhr
===============================================
get_dhr Get Datafile Header Report
Started: 2026-08-12 15:10:00
Block Size: 8192 bytes
Endian:     little-endian (x86)
===============================================
No  Path                                         DBName/DBID    Version  Ts#/TsName     File#/Rfile#  Size(DB/OS)  Create_Info           CheckPoint_Info        Fuzzy  Thread#/Seq#  Rlogs_SCN
--  ----                                         -------------  -------- -------------  -------------  -------------  -------------  --------------------  -------------------  -----  -------------  ----------
1   e:/cc/obet/dbf/system01.dbf                  ORCL/1248591446  0A200100  0/SYSTEM         1/1           590MB/OK      2005-08-30 13:50:22   2011-04-18 14:56:29  OK     1/351          534907</code></pre>
<h3 id="cmd-parse_ctl" style="color: #0969da;">9.2 parse_ctl &lt;path&gt;</h3>
<p style="color: #1f2328;">解析 Oracle 控制文件（<code style="color: #cf222e;">control01.ctl</code> / <code style="color: #cf222e;">control02.ctl</code> 等），输出 DB 名称、字符集、所有数据文件（type=04）、临时文件（type=07）、日志文件（type=03）、表空间清单。日志文件 SIZE 列由三级回退得到：</p>
<ol style="color: #1f2328;">
<li>操作系统上读取到的 redo 文件大小减去 512 字节（Oracle redo 文件尾部的 512 字节 footer）；</li>
<li>若 OS 文件无法访问（文件丢失 / 不可读），从控制文件第 21 / 22 块中 redo 记录（72 字节 / 条）的块数 × 512 字节取得；</li>
<li>上述两者都不可用时显示 <code style="color: #cf222e;">0</code>（对应记录仍会显示，便于人工干预）。</li>
</ol>
<p style="color: #1f2328;"><code style="color: #cf222e;">PATH</code> 列宽按当前解析结果中最长路径动态收紧；<code style="color: #cf222e;">SIZE</code> 数值右对齐。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; parse_ctl E:\ORADATA\ORCL\CONTROL01.CTL</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; parse_ctl E:\ORADATA\ORCL\CONTROL01.CTL
Oracle Control File Parser
==============================================
File: E:\ORADATA\ORCL\CONTROL01.CTL
Size: 9781248 bytes (597 x 16KB blocks)
==============================================
        PARSE RESULTS
==============================================
--- Database Info ---
  DB_NAME    : ORCL
  CHARSET_ID : 852 (ZHS16GBK)
--- Data Files (type=04) - 9 found ---
---------------------------------------------
  FILE#  PATH
  -----  ----
  4     E:\ORADATA\ORCL\USERS01.DBF
  3     E:\ORADATA\ORCL\UNDOTBS01.DBF
  2     E:\ORADATA\ORCL\SYSAUX01.DBF
  1     E:\ORADATA\ORCL\SYSTEM01.DBF
--- Log Files (type=03) - 3 found ---
---------------------------------------
  GROUP  PATH                                  SIZE
  -----  ----                                  ----
  1      E:\ORADATA\ORCL\REDO01.LOG         524288000
  2      E:\ORADATA\ORCL\REDO02.LOG         524288000
  3      E:\ORADATA\ORCL\REDO03.LOG         524288000
--- Tablespaces - 8 found ---</code></pre>
<h4 id="parse_ctl-rectl">9.2.1 自动生成的重建控制文件脚本</h4>
<p style="color: #1f2328;">完成屏幕输出后，OBET 会在当前工作目录生成 <code style="color: #cf222e;">rectl_&lt;DB_NAME&gt;_&lt;YYYYMMDDHHMMSS&gt;.sql</code>，可作为 <code style="color: #cf222e;">CREATE CONTROLFILE</code> 重建命令的参考模板。</p>
<p style="color: #1f2328;">文件包含 <code style="color: #cf222e;">CREATE CONTROLFILE</code> 头、<code style="color: #cf222e;">LOGFILE</code>（同 group 多成员合并为 <code style="color: #cf222e;">GROUP N (m1, m2)</code> 元组写法）、<code style="color: #cf222e;">DATAFILE</code>、<code style="color: #cf222e;">CHARACTER SET</code> 与结尾分号 <code style="color: #cf222e;">;</code>。</p>
<p style="color: #1f2328;">无法自动获取 SIZE 的 redo 文件仍写入记录，并在文件尾部追加英文提示，便于人工干预。</p>
<p style="color: #1f2328;">生成成功时屏幕输出形如：</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">Control file rebuild SQL generated: rectl_ORCL_20260727151150.sql</code></pre>
<h3 id="cmd-rdba" style="color: #0969da;">9.3 rdba &lt;hex&gt;</h3>
<p style="color: #1f2328;">把 RDBA 值拆解为 Oracle File# 和 Block#（高 10 位 = File#，低 22 位 = Block#）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; rdba 0x00400000
rdba 0x00400000 (4194304)
File#: 1
Block#: 0</code></pre>
<h3 id="cmd-getrdba" style="color: #0969da;">9.4 getrdba &lt;rfile#&gt; &lt;block#&gt;</h3>
<p style="color: #1f2328;">根据 rfile# 和 block# 计算 RDBA 值（rdba 的逆运算）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; getrdba 1 1
getrdba:
  rfile#: 1
  block#: 1
  RDBA:   0x00400001 (4194305)</code></pre>
<h3 id="cmd-dump_undo" style="color: #0969da;">9.5 dump_undo [file N] [block M]</h3>
<p style="color: #1f2328;">从 <em>undo$</em> 段读取每条 UNDO 记录的 <code style="color: #cf222e;">name</code> 和 <code style="color: #cf222e;">status$</code>。默认 <code style="color: #cf222e;">file 1 block 224</code>（Oracle 某些版本 undo$ segment header 位置）。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; dump_undo
OBET&gt; dump_undo file 1 block 224</code></pre>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; dump_undo file 1 block 224
==================================================
  DUMP UNDO$ - File#=1 (E:/CC/obet/dbf/SYSTEM01.DBF), Block=224
==================================================
Segment header kcbh.rdba=0x004000E0 =&gt; Oracle file#=1, block#=224 (listfile idx=1)
Reading undo$ segment header from file #1, block 224...
Segment header first 16 bytes (kcbh): 10 A2 00 00 E0 00 40 00 1A 02 00 00 00 00 01 04 
Found extent 0: rdba_block=225, size=7 blocks (covers blocks 225-231)
Data blocks to scan (7 total): 225 226 227 228 229 230 231 
US#=0    NAME=SYSTEM                          STATUS$=3  TS#=0   (system rollback segment)
US#=1    NAME=_SYSSMU1_3450900144$            STATUS$=2  TS#=2
US#=2    NAME=_SYSSMU2_2386332601$            STATUS$=2  TS#=2
...
Summary: scanned 7 blocks, extracted 21 rows from undo$.</code></pre>
<h3 id="cmd-patch_scn" style="color: #0969da;">9.6 patch_scn <span class="badge linux" style="color: #7d4e00;">Linux</span> <span class="badge lic" style="color: #82071e;">需授权</span></h3>
<p style="color: #1f2328;">直接修改 Oracle 进程内存中的 SCN 字段。仅在 Linux 构建中可用。</p>
<table style="color: #1f2328;">
<tbody>
<tr>
<th>用法</th>
<th>作用</th>
</tr>
<tr>
<td><code style="color: #cf222e;">patch_scn spid</code></td>
<td>列出本机 Oracle <code style="color: #cf222e;">LOCAL=YES</code> 进程</td>
</tr>
<tr>
<td><code style="color: #cf222e;">patch_scn addr</code></td>
<td>通过 sqlplus 辅助获取 SCN 在进程内存中的地址</td>
</tr>
<tr>
<td><code style="color: #cf222e;">patch_scn [&lt;spid&gt;] [&lt;addr&gt;] &lt;newval&gt;</code></td>
<td>把目标进程 SCN 改写为 <code style="color: #cf222e;">newval</code></td>
</tr>
</tbody>
</table>
<h2 id="session" style="color: #1f2328;">10. 会话 / 杂项</h2>
<h3 id="cmd-license" style="color: #0969da;">10.1 license</h3>
<p style="color: #1f2328;">显示当前许可证状态、硬件ID、到期时间。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; license
========================================
         OBET License Information
========================================
Your Hardware ID: F443C4B31A04E56FDC6D9310C1648AC700946AC5269DF2F6DBE8507FDC704812
License Status: AUTHORIZED
Expiry Time:    2030-01-01 23:00:00</code></pre>
<h3 id="cmd-spool" style="color: #0969da;">10.2 spool &lt;file&gt; | off</h3>
<p style="color: #1f2328;">把后续输出同时写入指定文件；<code style="color: #cf222e;">spool off</code> 停止。</p>
<pre style="color: #1f2328;"><code style="color: #1f2328;">OBET&gt; spool dbv_session.log
OBET&gt; dbv
OBET&gt; spool off</code></pre>
<h2 id="faq" style="color: #1f2328;">11. 常见问题</h2>
<h3 style="color: #0969da;">Q1：Oracle 正在使用时能不能直接读取数据文件？</h3>
<p style="color: #1f2328;">可以。Windows 下 OBET 以 <code style="color: #cf222e;">FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE</code> 共享模式打开文件，Oracle 进程独占持有时 OBET 仍能读取。</p>
<h3 style="color: #0969da;">Q2：如何切换数据文件？</h3>
<p style="color: #1f2328;">先 <code style="color: #cf222e;">open listfile.txt</code> 加载列表，再用 <code style="color: #cf222e;">set file N</code>（或任意命令中的 <code style="color: #cf222e;">file N</code> 子句）切换。</p>
<h3 style="color: #0969da;">Q3：写命令报 “license invalid / expired / hwid mismatch”？</h3>
<p style="color: #1f2328;">授权与当前主机 HWID 绑定、存在有效期。用 <code style="color: #cf222e;">license</code> 命令查看当前授权状态，联系维护者重新签发 <code style="color: #cf222e;">license.dat</code>。</p>
<h3 style="color: #0969da;">Q4：<code style="color: #cf222e;">forcecopy</code> 与普通拷贝区别？</h3>
<p style="color: #1f2328;">普通跨文件操作要求源块能正常读取；<code style="color: #cf222e;">forcecopy</code> 跳过 IO 失败的位置并填 0，专为磁盘部分损坏的应急场景设计，目标文件保持原始 <code style="color: #cf222e;">blocksize</code> 和块数。</p>
<h3 style="color: #0969da;">Q5：<code style="color: #cf222e;">p kcvfh.kcvfhhdr.kccfhtyp</code> 为什么报错？</h3>
<p style="color: #1f2328;"><code style="color: #cf222e;">print</code> 仅支持一级字段访问（如 <code style="color: #cf222e;">p kcvfh.kcvfhhdr</code>），不支持二级（如 <code style="color: #cf222e;">p kcvfh.kcvfhhdr.kccfhtyp</code>）。</p>
<h3 style="color: #0969da;">Q6：<code style="color: #cf222e;">build block</code> 和 <code style="color: #cf222e;">repair block</code> 区别？</h3>
<p style="color: #1f2328;"><code style="color: #cf222e;">build block N,M</code> 是从无到有构造一个 Oracle 空块（填 0&#215;00 + 初始化 kcbh/rdba），写入目标文件时需人工确认覆盖；适合块数据完全丢失的场景。</p>
<p style="color: #1f2328;"><code style="color: #cf222e;">repair block</code> 是读取目标块后原地修复 seq_kcbh、tailchk、checksum 三项，不改变块内容本身；适合块内容完好但校验值损坏的场景。</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/04/oracle-awr%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">ORACLE AWR使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/10/oracle%e4%b8%adconnect-by-start-with-%e7%9a%84%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">Oracle中connect by…start with…的使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/warning-inbound-connection-timed-out-ora-3136.html" rel="bookmark" class="crp_title">WARNING: inbound connection timed out (ORA-3136)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/linux%e4%b9%8bpmap%e5%91%bd%e4%bb%a4.html" rel="bookmark" class="crp_title">Linux之pmap命令</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/%e5%90%8c%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%9a%e7%89%88%e6%9c%ac%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9b%91%e5%90%ac%e9%85%8d%e7%bd%ae.html" rel="bookmark" class="crp_title">同台服务器多版本数据库监听配置</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2009/11/%e5%bc%b9%e5%87%badiv%ef%bc%8c%e9%94%81%e5%ae%9a%e7%95%8c%e9%9d%a2.html" rel="bookmark" class="crp_title">弹出div，锁定界面</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/oracle%e7%9b%91%e5%90%ac%e8%ae%be%e7%bd%ae%e5%af%86%e7%a0%81.html" rel="bookmark" class="crp_title">Oracle监听设置密码</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html" rel="bookmark" class="crp_title">ORA-01012: not logged on</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/%e5%9d%97%e4%bf%ae%e6%94%b9%e8%b7%9f%e8%b8%aa%e7%89%b9%e6%80%a7block-change-tracking.html" rel="bookmark" class="crp_title">块修改跟踪特性(Block Change Tracking)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/bbed%e7%a0%b4%e5%9d%8f%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">bbed破坏数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2009/11/%e5%8a%a8%e6%80%81%e6%9b%b4%e5%a5%bd%e7%bd%91%e7%ab%99%e8%83%8c%e6%99%af%e5%9b%be%e7%89%87%e3%80%81%e8%83%8c%e6%99%af%e9%a2%9c%e8%89%b2%ef%bc%8cjs%e8%b0%83%e8%89%b2%e6%9d%bf.html" rel="bookmark" class="crp_title">动态更好网站背景图片、背景颜色，js调色板</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/ora-00845-memory_target-not-supported-on-this-system-2.html" rel="bookmark" class="crp_title">ORA-00845: MEMORY_TARGET not supported on this system</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/08/obet-oracle-block-editor-tool.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></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>
		
				<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/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/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/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/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/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/03/orafhr.html" rel="bookmark" class="crp_title">Oracle数据库被勒索加密一键open工具&#8211;OraFHR</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></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>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>Oracle Block Edit Tool (obet) 功能增强–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>
		
				<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/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/03/orafhr.html" rel="bookmark" class="crp_title">Oracle数据库被勒索加密一键open工具&#8211;OraFHR</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/imp-00098-internal-error-impgst2-ora-24801.html" rel="bookmark" class="crp_title">exp dmp导入报IMP-00098: INTERNAL ERROR: impgst2故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/aix-nfs-combehin.html" rel="bookmark" class="crp_title">aix环境写入大文件设置combehin提高效率</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>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>Oracle 19c 202607补丁（RUs+OJVM）-19.32</title>
		<link>https://www.xifenfei.com/2026/07/oracle-19c-202607-19-32-html.html</link>
		<comments>https://www.xifenfei.com/2026/07/oracle-19c-202607-19-32-html.html#comments</comments>
		<pubDate>Mon, 27 Jul 2026 10:10:43 +0000</pubDate>
		
				<category><![CDATA[Oracle安装升级]]></category>
		<category><![CDATA[19.32]]></category>
		<category><![CDATA[19.32 patch]]></category>
		<category><![CDATA[39418910]]></category>
		<category><![CDATA[39467003]]></category>
		<category><![CDATA[39472050]]></category>
		<category><![CDATA[oracle 26.07 patch]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12272</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/oracle-19c-202607-19-32-html.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/oracle-19c-202607-19-32-html.html" target="_blank">Oracle 19c 202607补丁（RUs+OJVM）-19.32</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<table width="605">
<thead>
<tr>
<td width="189"><strong>Release</strong></td>
<td width="142"><strong>Database Update</strong></td>
<td width="9"><strong> </strong></td>
<td width="95"><strong>GI Update</strong></td>
<td width="170"><strong>Windows Bundle Patch</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td width="189"><strong>JUL2026 (19.32.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=39472050">39472050</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=39467003">39467003</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=39418910">39418910</a></td>
</tr>
<tr>
<td width="189"><strong>APR2026 (19.31.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=39034528">39034528</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=39036936">39036936</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=38818049">38818049</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2026 (19.30.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=38632161">38632161</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=38629535">38629535</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=38597735">38597735</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2025 (19.29.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=38291812">38291812</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=38298204">38298204</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=38111211">38111211</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2025 (19.28.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37960098">37960098</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=37957391">37957391</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=37962957">37962957</a></td>
</tr>
<tr>
<td width="189"><strong>APR2025 (19.27.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37642901">37642901</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=37641958">37641958</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=37532350">37532350</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2025 (19.26.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37260974">37260974</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=37257886">37257886</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=37486199">37486199</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2024 (19.25.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36912597">36912597</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=36916690">36916690</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=36878821">36878821</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2024 (19.24.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36582781">36582781</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=36582629">36582629</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=36521936">36521936</a></td>
</tr>
<tr>
<td width="189"><strong>APR2024 (19.23.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36233263">36233263</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=36233126">36233126</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=36219938">36219938</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2024 (19.22.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35943157">35943157</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=35940989">35940989</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=35962832">35962832</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2023 (19.21.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35643107">35643107</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=35642822">35642822</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=35681552">35681552</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2023 (19.20.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35320081">35320081</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=35319490">35319490</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=35348034">35348034</a></td>
</tr>
<tr>
<td width="189"><strong>APR2023 (19.19.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35042068">35042068</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=35037840">35037840</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=35046439">35046439</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2023 (19.18.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34765931">34765931</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=34762026">34762026</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=34750795">34750795</a></td>
</tr>
<tr>
<td width="189"><strong>Oct2022 (19.17.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34419443">34419443</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=34416665">34416665</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=34468114">34468114</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2022 (19.16.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34133642">34133642</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=34130714">34130714</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=34110685">34110685</a></td>
</tr>
<tr>
<td width="189"><strong>APR2022 (19.15.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33806152">33806152</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=33803476">33803476</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=33829175">33829175</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2022 (19.14.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33515361">33515361</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=33509923">33509923</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=33575656">33575656</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2021(19.13.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33192793">33192793</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=33182768">33182768</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=33155330">33155330</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2021 (19.12.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32904851">32904851</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=32895426">32895426</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=32832237">32832237</a></td>
</tr>
<tr>
<td width="189"><strong>APR2021 (19.11.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32545013">32545013</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=32545008">32545008</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=32409154">32409154</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2021 (19.10.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32218454">32218454</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=32226239">32226239</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=32062765">32062765</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2020 (19.9.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=31771877">31771877</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=31750108">31750108</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=31719903">31719903</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2020 (19.8.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=31281355">31281355</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=31305339">31305339</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=31247621">31247621</a></td>
</tr>
<tr>
<td width="189"><strong>APR2020 (19.7.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30869156">30869156</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=30899722">30899722</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=30901317">30901317</a></td>
</tr>
<tr>
<td width="189"><strong>JAN2020 (19.6.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30557433">30557433</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=30501910">30501910</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=30445947">30445947</a></td>
</tr>
<tr>
<td width="189"><strong>OCT2019 (19.5.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30125133">30125133</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=30116789">30116789</a></td>
<td width="170"><a href="https://support.oracle.com/support/?patchId=30151705">30151705</a></td>
</tr>
<tr>
<td width="189"><strong>JUL2019 (19.4.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=29834717">29834717</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=29708769">29708769</a></td>
<td width="170">-</td>
</tr>
<tr>
<td width="189"><strong>APR2019 (19.3.0.0.0)</strong></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=29517242">29517242</a></td>
<td width="9">&nbsp;</td>
<td width="95"><a href="https://support.oracle.com/support/?patchId=29517302">29517302</a></td>
<td width="170">-</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="624">
<thead>
<tr>
<td width="217"><strong>Release</strong></td>
<td width="113"><strong>OJVM Update</strong></td>
<td width="151"><strong>OJVM + DB Update</strong></td>
<td width="142"><strong>OJVM + GI Update</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td width="217"><strong>JUL2026 (19.32.0.0.260721)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=39222882">39222882</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=39618649">39618649</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=39618711">39618711</a></td>
</tr>
<tr>
<td width="217"><strong>APR2026 (19.31.0.0.260421)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=38906621">38906621</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=39062931">39062931</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=39062956">39062956</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2026 (19.30.0.0.260120)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=38523609">38523609</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=38658587">38658587</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=38658588">38658588</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2025 (19.29.0.0.251021)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=38194382">38194382</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=38273545">38273545</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=38273558">38273558</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2025 (19.28.0.0.250715)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=37847857">37847857</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=37952354">37952354</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37952382">37952382</a></td>
</tr>
<tr>
<td width="217"><strong>APR2025 (19.27.0.0.250415)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=37499406">37499406</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=37591483">37591483</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37591516">37591516</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2025 (19.26.0.0.250121)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=37102264">37102264</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=37262172">37262172</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=37262208">37262208</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2024 (19.25.0.0.241015)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=36878697">36878697</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=36866623">36866623</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36866740">36866740</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2024 (19.24.0.0.240716)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=36414915">36414915</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=36522340">36522340</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36522439">36522439</a></td>
</tr>
<tr>
<td width="217"><strong>APR2024 (19.23.0.0.240416)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=36199232">36199232</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=36209492">36209492</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36209493">36209493</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2024 (19.22.0.0.240116)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=35926646">35926646</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=36031426">36031426</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=36031453">36031453</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2023 (19.21.0.0.231017)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=35648110">35648110</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=35742413">35742413</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35742441">35742441</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2023 (19.20.0.0.230718)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=35354406">35354406</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=35370174">35370174</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35370167">35370167</a></td>
</tr>
<tr>
<td width="217"><strong>APR2023 (19.19.0.0.230418)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=35050341">35050341</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=35058163">35058163</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=35058172">35058172</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2023 (19.18.0.0.230117)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=34786990">34786990</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=34773489">34773489</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34773504">34773504</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2022 (19.17.0.0.221018)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=34411846">34411846</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=34449114">34449114</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34449117">34449117</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2022 (19.16.0.0.220719)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=34086870">34086870</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=34160831">34160831</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=34160854">34160854</a></td>
</tr>
<tr>
<td width="217"><strong>APR2022 (19.15.0.0.220419)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=33808367">33808367</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=33859194">33859194</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33859214">33859214</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2022 (19.14.0.0.220118)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=33561310">33561310</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=33567270">33567270</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33567274">33567274</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2021 (19.13.0.0.211019)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=33192694">33192694</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=33248420">33248420</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=33248471">33248471</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2021 (19.12.0.0.210720)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=32876380">32876380</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=32900021">32900021</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32900083">32900083</a></td>
</tr>
<tr>
<td width="217"><strong>APR2021 (19.11.0.0.210420)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=32399816">32399816</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=32578972">32578972</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32578973">32578973</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2021 (19.10.0.0.210119)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=32067171">32067171</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=32126828">32126828</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=32126842">32126842</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2020 (19.9.0.0.201020)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=31668882">31668882</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=31720396">31720396</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=31720429">31720429</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2020 (19.8.0.0.200714)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=31219897">31219897</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=31326362">31326362</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=31326369">31326369</a></td>
</tr>
<tr>
<td width="217"><strong>APR2020 (19.7.0.0.200414)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=30805684">30805684</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=30783543">30783543</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30783556">30783556</a></td>
</tr>
<tr>
<td width="217"><strong>JAN2020 (19.6.0.0.200114)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=30484981">30484981</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=30463595">30463595</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30463609">30463609</a></td>
</tr>
<tr>
<td width="217"><strong>OCT2019 (19.5.0.0.191015)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=30128191">30128191</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=30133124">30133124</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=30133178">30133178</a></td>
</tr>
<tr>
<td width="217"><strong>JUL2019 (19.4.0.0.190716)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=29774421">29774421</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=29699079">29699079</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=29699097">29699097</a></td>
</tr>
<tr>
<td width="217"><strong>APR2019 (19.3.0.0.190416)</strong></td>
<td width="113"><a href="https://support.oracle.com/support/?patchId=29548437">29548437</a></td>
<td width="151"><a href="https://support.oracle.com/support/?patchId=29621253">29621253</a></td>
<td width="142"><a href="https://support.oracle.com/support/?patchId=29621299">29621299</a></td>
</tr>
</tbody>
</table>
<p>参考：Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases KA958</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/08/oracle-21c-202507-21-19.html" rel="bookmark" class="crp_title">Oracle 21c 202507补丁-21.19</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/05/oracle-19c-202604-19-31.html" rel="bookmark" class="crp_title">Oracle 19c 202604补丁（RUs+OJVM）-19.31</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/07/oracle-19c-2024-07-patch.html" rel="bookmark" class="crp_title">Oracle 19c 2024.07补丁（RUs+OJVM）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/10/oracle-19c-202410.html" rel="bookmark" class="crp_title">Oracle 19c 202410补丁（RUs+OJVM）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/oracle-19c-202504-19-27.html" rel="bookmark" class="crp_title">Oracle 19c 202504补丁（RUs+OJVM）-19.27</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/oracle-19c-202501.html" rel="bookmark" class="crp_title">Oracle 19c 202501补丁（RUs+OJVM）-19.26</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/oracle-19c-202510-19-29.html" rel="bookmark" class="crp_title">Oracle 19c 202510补丁（RUs+OJVM）-19.29</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/07/oracle-19c-202507-19-28-html.html" rel="bookmark" class="crp_title">Oracle 19c 202507补丁（RUs+OJVM）-19.28</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/oracle-19c-202601-19-30.html" rel="bookmark" class="crp_title">Oracle 19c 202601补丁（RUs+OJVM）-19.30</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/01/patch-202401.html" rel="bookmark" class="crp_title">Oracle 19c/21c最新patch信息-202401</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/07/patch-202307.html" rel="bookmark" class="crp_title">Assistant: Download Reference for Oracle Database/GI PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases-202307</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/04/patch-202404.html" rel="bookmark" class="crp_title">Oracle 19c/21c最新patch信息-202404</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/oracle-19c-202607-19-32-html.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>Patch_SCN快速修复ORA-01555数据库open故障</title>
		<link>https://www.xifenfei.com/2026/07/patch_scn-ora-01555.html</link>
		<comments>https://www.xifenfei.com/2026/07/patch_scn-ora-01555.html#comments</comments>
		<pubDate>Sun, 26 Jul 2026 00:37:07 +0000</pubDate>
		
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[ora-01555 patch_scn]]></category>
		<category><![CDATA[patch_scn 修改scn]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12270</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/patch_scn-ora-01555.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/patch_scn-ora-01555.html" target="_blank">Patch_SCN快速修复ORA-01555数据库open故障</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有一个朋友在线把数据文件拷贝走,然后发现异常又拷贝回来,结果再重启库发现数据库无法正常启动,尝试强制拉库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database using backup controlfile until cancel;
ORA-00279: change 1046834263 generated at 07/24/2026 22:04:11 needed for thread
1
ORA-00289: suggestion : /data02/archivelog/reybtstg/1_1755_1147617488.dbf
ORA-00280: change 1046834263 for thread 1 is in sequence #1755


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/reybtstg/system01.dbf'

SQL&gt; alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 10 with name
&quot;_SYSSMU10_1197734989$&quot; too small
Process ID: 298308
Session ID: 613 Serial number: 3
</pre>
<p>alert日志报错信息</p>
<pre class="brush: bash; title: ; notranslate">
ARC0: STARTING ARCH PROCESSES COMPLETE
Thread 1 opened at log sequence 1
  Current log# 1 seq# 1 mem# 0: /data02/reybtstg/oradata/redo01.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sat Jul 25 14:15:34 2026
SMON: enabling cache recovery
ORA-01555 caused by SQL statement below (SQL ID: 4krwuz0ctqxdt, SCN: 0x0000.3e656c5d):
select ctime, mtime, stime from obj$ where obj# = :1
Errors in file /u01/app/oracle/diag/rdbms/reybtstg/reybtstg/trace/reybtstg_ora_298308.trc:
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 10 with name &quot;_SYSSMU10_1197734989$&quot; too small
Errors in file /u01/app/oracle/diag/rdbms/reybtstg/reybtstg/trace/reybtstg_ora_298308.trc:
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 10 with name &quot;_SYSSMU10_1197734989$&quot; too small
Error 704 happened during db open, shutting down database
USER (ospid: 298308): terminating the instance due to error 704
Instance terminated by USER, pid = 298308
ORA-1092 signalled during: alter database open resetlogs...
opiodr aborting process unknown ospid (298308) as a result of ORA-1092
Sat Jul 25 14:15:35 2026
ORA-1092 : opitsk aborting process
</pre>
<p>这个错误比较好处理只要修改Oracle 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 for Linux</a>进行修改</p>
<pre class="brush: bash; title: ; notranslate">
---会话1
[oracle@xff ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Jul 25 14:21:11 2026

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&gt; startup nomount pfile='/tmp/pfile';
ORACLE instance started.

Total System Global Area 6.4137E+10 bytes
Fixed Size		    2269072 bytes
Variable Size		 1.5569E+10 bytes
Database Buffers	 4.8318E+10 bytes
Redo Buffers		  246980608 bytes
SQL&gt; @/tmp/rectl

Control file created.

---会话2
[oracle@xff tmp]$ ./Patch_SCN -h
Usage:
  Software License:       ./Patch_SCN -key
  Get Oracle SPID:        ./Patch_SCN -spid
  Get SCN address:        ./Patch_SCN -addr
  Automatic address mode: ./Patch_SCN &lt;spid&gt; &lt;new_value&gt;
  Manual address mode:    ./Patch_SCN &lt;spid&gt; &lt;address&gt; &lt;new_value&gt;
  Where:
    &lt;spid&gt; - Oracle process ID
    &lt;address&gt; - Memory address (hexadecimal)
    &lt;new_value&gt; - SCN value to modify (decimal or hexadecimal)
[oracle@xff tmp]$ ./Patch_SCN -spid

Found 3 Oracle LOCAL=YES processes: 283668  283670  305036  

Process Details:
UID        PID  PPID  C STIME TTY          TIME CMD
oracle   283668 283627  0 Jul18 ?        00:15:10 oracletesta (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle   283670 283627  0 Jul18 ?        00:35:25 oracletesta (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle   305036 304678  0 14:21 ?        00:00:00 oracleorcltg (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
[oracle@xff tmp]$ ./Patch_SCN 305036 1146834263
Successfully obtained address automatically: 0x6001ae70
Original Oracle SCN at Address 0x6001ae70: 0x0
Are you sure you want to modify Oracle SCN? (yes/no): yes
New SCN at Address 0x6001ae70: 0x445b4d57
Oracle SCN successfully modified.
</pre>
<p>数据库正常打开</p>
<pre class="brush: bash; title: ; notranslate">
----会话1
SQL&gt; recover database;
Media recovery complete.
SQL&gt; alter database open ;

Database altered.

SQL&gt; 

</pre>
<p>完成本次数据库恢复工作.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/patch_scn-for-linux.html" rel="bookmark" class="crp_title">Patch_SCN for Linux 功能完善</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/05/ora-00704-ora-00604-ora-01555.html" rel="bookmark" class="crp_title">数据库open过程遭遇ORA-1555对应sql语句补充</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/01/tab-recovery-error.html" rel="bookmark" class="crp_title">tab$恢复错误汇总</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/last-mile-db-rescue.html" rel="bookmark" class="crp_title">接手一个只差临门一脚的数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/07/%e5%9c%a8%e6%95%b0%e6%8d%ae%e5%ba%93open%e8%bf%87%e7%a8%8b%e4%b8%ad%e5%b8%b8%e9%81%87%e5%88%b0ora-01555%e6%b1%87%e6%80%bb.html" rel="bookmark" class="crp_title">在数据库open过程中常遇到ORA-01555汇总</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/patch_scn-ora-600-2663.html" rel="bookmark" class="crp_title">Patch_SCN快速解决ORA-600 2663故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/11/ora-01163-ora-01110-ora-600-kccccfl_1.html" rel="bookmark" class="crp_title">重建ctl遭遇ORA-01163  ORA-01110和ORA-600 kccccfl_1错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/03/undo%e5%bc%82%e5%b8%b8%e6%80%bb%e7%bb%93%e5%92%8c%e6%81%a2%e5%a4%8d%e6%80%9d%e8%b7%af.html" rel="bookmark" class="crp_title">undo异常总结和恢复思路</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/05/ora-600-kcratr_scan_rc.html" rel="bookmark" class="crp_title">ORA-00600  kcratr_scan_rc</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/06/sstop-recovery.html" rel="bookmark" class="crp_title">.sstop勒索加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/04/ora-00704-ora-00702.html" rel="bookmark" class="crp_title">ORA-00702: bootstrap verison &#8221; inconsistent with version &#8217;8.0.0.0.0&#8242;</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/06/tab-recovery-ora-600-13304.html" rel="bookmark" class="crp_title">tab$异常被处理之后报ORA-600 13304故障处理</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/patch_scn-ora-01555.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>快速处理 ORA-01210: data file header is media corrupt 故障</title>
		<link>https://www.xifenfei.com/2026/07/ora-01210.html</link>
		<comments>https://www.xifenfei.com/2026/07/ora-01210.html#comments</comments>
		<pubDate>Thu, 23 Jul 2026 23:38:56 +0000</pubDate>
		
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[data file header is media corrupt]]></category>
		<category><![CDATA[obet 文件头修复]]></category>
		<category><![CDATA[ORA-01210]]></category>
		<category><![CDATA[文件头损坏修复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12268</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/ora-01210.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/ora-01210.html" target="_blank">快速处理 ORA-01210: data file header is media corrupt 故障</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>客户反馈硬件故障之后,数据库无法正常启动，尝试recover操作报ORA-01122错误</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database;
ORA-00283: 恢复会话因错误而取消
ORA-01122: 数据库文件 1 验证失败
ORA-01110: 数据文件 1: 'H:\BAIDUNETDISK\ORACLEDATA\ORCL\SYSTEM01.DBF'
ORA-01207: 文件比控制文件更新 - 旧的控制文件
</pre>
<p>这个错误比较明显，由于数据文件的checkpoint信息比数据文件 file# 1新，通过重建ctl可以进行解决</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; @rectl.sql
CREATE CONTROLFILE REUSE DATABASE &quot;ORCL&quot; NORESETLOGS FORCE LOGGING ARCHIVELOG
*
第 1 行出现错误:
ORA-01503: CREATE CONTROLFILE failed
ORA-01210: data file header is media corrupt
ORA-01110: data file 42: 'H:\BAIDUNETDISK\ORACLEDATA\ORCL\XFF.DBF'
</pre>
<p>但是这里遭遇到ORA-01210错误</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@iZbp11c0qyuuo1gr7j98upZ ~]$ oerr ora 1210
01210, 00000, &quot;data file header is media corrupt&quot;
// *Cause: The file header block is internally inconsistent. The beginning
//         of the block has a header with a checksum and other data for
//         insuring the consistancy of the block. It is possible that
//         the last disk write did not operate correctly. The most likely
//         problem is that this is not a datafile for any database.
// *Action: Have operating system make correct file available to database.
//         If the trace file dump indicates that only the checksum is wrong,
//         restore from a backup and do media recovery.
</pre>
<p>这个错误比较明显，官方解释可能是由于文件头的写丢失导致checksum异常,对于这样的故障，可以考虑使用bbed进行修复，但是obet更加方便（<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>），直接使用这个工具进行处理</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; tailchk
Check tailchk for File H:\BaiduNetdisk\oracledata\orcl\XFF.DBF, Block 1:
current = 0x6E743122, required = 0x010B0000
OBET&gt; d
File: H:\BaiduNetdisk\oracledata\orcl\HD_DATAPMS01.DBF
Block: 1                Offsets:     0 to    31
--------------------------------------------------------------------------------
00002000 0BA20000 0100800A 00000000 00000104 02870000 00000000 0004200B 2F2E315E
&lt;32 bytes read&gt;
OBET&gt; set mode edit
mode set to: edit
OBET&gt; tailchk apply
Confirm applying tailchk:
File: H:\BaiduNetdisk\oracledata\orcl\XFF.DBF
Block: 1
Offset in block: 8188 (file offset: 0x00003FFC)
Original value: 0x6E743122
New value:      0x010B0000
Confirm? (Y/YES to proceed): y
Verification successful: Stored tailchk matches calculated value (0x010B0000).
Tailchk applied successfully.
OBET&gt; sum apply
Confirm applying checksum:
File: H:\BaiduNetdisk\oracledata\orcl\XFF.DBF
Block: 1
Offset in block: 16 (file offset: 0x00002010)
Original value: 0x0287
New value:      0x38ED
Confirm? (Y/YES to proceed): y
Verification successful: Stored checksum matches calculated value (0x38ED).
Checksum applied successfully.
</pre>
<p>然后直接重建ctl成功，并顺利打开数据库</p>
<pre class="brush: bash; title: ; notranslate">
Thu Jul 23 12:11:39 2026
Successful mount of redo thread 1, with mount id 1767178232
Completed: CREATE CONTROLFILE REUSE DATABASE &quot;ORCL&quot; NORESETLOGS FORCE LOGGING ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 18688
LOGFILE
  GROUP 1 'H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO01.LOG'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 'H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO02.LOG'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 'H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO03.LOG'  SIZE 50M BLOCKSIZE 512
DATAFILE
  'H:\BAIDUNETDISK\ORACLEDATA\ORCL\SYSTEM01.DBF',
  'H:\BAIDUNETDISK\ORACLEDATA\ORCL\SYSAUX01.DBF',
  'H:\BAIDUNETDISK\ORACLEDATA\ORCL\UNDOTBS01.DBF',
………………
CHARACTER SET ZHS16GBK
Thu Jul 23 12:12:21 2026
ALTER DATABASE RECOVER  database  
Media Recovery Start
 started logmerger process
Parallel Media Recovery started with 20 slaves
Thu Jul 23 12:12:21 2026
Recovery of Online Redo Log: Thread 1 Group 3 Seq 104748 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO03.LOG
Recovery of Online Redo Log: Thread 1 Group 1 Seq 104749 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO01.LOG
Completed: ALTER DATABASE RECOVER  database  
alter database open upgrade
Beginning crash recovery of 1 threads
 parallel recovery started with 19 processes
Started redo scan
Completed redo scan
 read 8331 KB redo, 0 data blocks need recovery
Started redo application at
 Thread 1: logseq 104749, block 2, scn 788671390
Recovery of Online Redo Log: Thread 1 Group 1 Seq 104749 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO01.LOG
Completed redo application of 0.00MB
Completed crash recovery at
 Thread 1: logseq 104749, block 16665, scn 788695898
 0 data blocks read, 0 data blocks written, 8331 redo k-bytes read
Initializing SCN for created control file
Database SCN compatibility initialized to 3
Thu Jul 23 12:12:27 2026
LGWR: STARTING ARCH PROCESSES
Thu Jul 23 12:12:27 2026
ARC0 started with pid=40, OS id=20580 
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thu Jul 23 12:12:28 2026
ARC1 started with pid=41, OS id=12396 
Thu Jul 23 12:12:28 2026
ARC2 started with pid=42, OS id=18888 
Thu Jul 23 12:12:28 2026
ARC3 started with pid=43, OS id=16552 
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC2: Becoming the heartbeat ARCH
Archived Log entry 1 added for thread 1 sequence 104747 ID 0x5e30f62f dest 1:
Thread 1 advanced to log sequence 104750 (thread open)
Thread 1 opened at log sequence 104750
  Current log# 2 seq# 104750 mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO02.LOG
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Thu Jul 23 12:12:29 2026
SMON: enabling cache recovery
Archived Log entry 2 added for thread 1 sequence 104749 ID 0x5e30f62f dest 1:
Archived Log entry 3 added for thread 1 sequence 104748 ID 0x5e30f62f dest 1:
[19300] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:15968843 end:15968859 diff:16 (0 seconds)
Dictionary check beginning
Tablespace 'TEMP' 
#3
 found in data dictionary,
but not in the controlfile. Adding to controlfile.
Dictionary check complete
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
*********************************************************************
WARNING: The following temporary tablespaces contain no files.
         This condition can occur when a backup controlfile has
         been restored.  It may be necessary to add files to these
         tablespaces.  That can be done using the SQL statement:
         ALTER TABLESPACE &lt;tablespace_name&gt; ADD TEMPFILE
         Alternatively, if these temporary tablespaces are no longer
         needed, then they can be dropped.
           Empty temporary tablespace: TEMP
*********************************************************************
Database Characterset is ZHS16GBK
Stopping background process MMNL
Errors in file C:\APP\XFF\diag\rdbms\orcl\orcl\trace\orcl_smon_18084.trc  (incident=7313):
ORA-00600: 内部错误代码, 参数: [4194], [], [], [], [], [], [], [], [], [], [], []
Incident details in: C:\APP\XFF\diag\rdbms\orcl\orcl\incident\incdir_7313\orcl_smon_18084_i7313.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Block recovery from logseq 104750, block 74 to scn 906345854
Recovery of Online Redo Log: Thread 1 Group 2 Seq 104750 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO02.LOG
Block recovery completed at rba 104750.75.16, scn 0.906345855
Block recovery from logseq 104750, block 74 to scn 906345854
Recovery of Online Redo Log: Thread 1 Group 2 Seq 104750 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORACLEDATA\ORCL\REDO02.LOG
Block recovery completed at rba 104750.75.16, scn 0.906345855
Errors in file C:\APP\XFF\diag\rdbms\orcl\orcl\trace\orcl_smon_18084.trc:
ORA-01595: 释放区 (2) 回退段 (4) 时出错
ORA-00600: 内部错误代码, 参数: [4194], [], [], [], [], [], [], [], [], [], [], []
</pre>
<p>这里有一个ORA-600 4194错误,由于undo回滚段异常，对异常回滚段进行处理，然后导出数据完成本次恢复工作</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/06/hardware-recovery-oracle-0kb.html" rel="bookmark" class="crp_title">解决一次硬件恢复之后数据文件0kb的故障恢复case</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/2022/08/oracle-recovery-tools-ora-600-3020.html" rel="bookmark" class="crp_title">Oracle Recovery Tools 解决ORA-600 3020故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/12/oracle-online-mv-datafile-recovery.html" rel="bookmark" class="crp_title">在线mv方式迁移数据文件导致数据库无法正常启动</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/02/ora-01595-ora-600-4194.html" rel="bookmark" class="crp_title">ORA-01595/ORA-600 4194处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/_allow_resetlogs_corruption-ora-600-2662.html" rel="bookmark" class="crp_title">不当使用_allow_resetlogs_corruption参数引起ORA-600 2662错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/offline-resetlogs-recovery.html" rel="bookmark" class="crp_title">先offline数据文件，再resetlogs导致恢复复杂的故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/02/ora-00742-ora-00312-recovery.html" rel="bookmark" class="crp_title">ORA-00742 ORA-00312故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/recover-truncate-dont-open.html" rel="bookmark" class="crp_title">不当恢复truncate数据导致数据库不能open处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/09/ora-00600-dbkif_find_next_record_1.html" rel="bookmark" class="crp_title">ORA-00600 dbkif_find_next_record_1</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/ora-600-kcratr_nab_less_than_odr-ora-600-4193.html" rel="bookmark" class="crp_title">ORA-600 kcratr_nab_less_than_odr和ORA-600 4193故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/review-alert-logs-and-open-database.html" rel="bookmark" class="crp_title">通过alert日志回顾其他dba oracle异常恢复故障处理以及后续open数据库操作</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/ora-01210.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
		<item>
		<title>ORA-00314: log 3 of thread 1, expected sequence# N doesn’t match 0</title>
		<link>https://www.xifenfei.com/2026/07/ora-00314-ora-00312-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/07/ora-00314-ora-00312-recovery.html#comments</comments>
		<pubDate>Tue, 21 Jul 2026 15:02:16 +0000</pubDate>
		
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[ORA-00312]]></category>
		<category><![CDATA[ORA-00314]]></category>
		<category><![CDATA[ORA-00314 ORA-00312]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12263</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/ora-00314-ora-00312-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/07/ora-00314-ora-00312-recovery.html" target="_blank">ORA-00314: log 3 of thread 1, expected sequence# N doesn&#8217;t match 0</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有朋友咨询一个Oracle数据库由于断电无法启动的问题,最初错误是一个非常常见的ORA-01113 ORA-01110错误<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/ora-01113.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/ora-01113.png" alt="ora-01113" width="659" height="208" class="alignnone size-full wp-image-12264" /></a><br />
<hr />
对应的alert日志错误</p>
<pre class="brush: bash; title: ; notranslate">
Tue Jul 21 15:38:12 2026
ALTER DATABASE OPEN
Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_4632.trc:
ORA-01113: 文件 2 需要介质恢复
ORA-01110: 数据文件 2: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBF'
ORA-1113 signalled during: ALTER DATABASE OPEN...
Tue Jul 21 15:38:12 2026
Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_m000_4948.trc:
ORA-00322: log 1 of thread 1 is not current copy
ORA-00312: online log 1 thread 1: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG'
Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_m000_4948.trc:
ORA-00314: log 2 of thread 1, expected sequence# 6890 doesn't match 0
ORA-00312: online log 2 thread 1: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG'
Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_m000_4948.trc:
ORA-00314: log 3 of thread 1, expected sequence# 6891 doesn't match 0
ORA-00312: online log 3 thread 1: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO03.LOG'
</pre>
<p>把数据文件拿到本地之后,尝试执行recover database操作</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database;
ORA-00283: 恢复会话因错误而取消
ORA-00314: 日志 3 (用于线程 1) 要求的 sequence# 6891 与 0 不匹配
ORA-00312: 联机日志 3 线程 1: 'H:\BAIDUNETDISK\ORCL\REDO03.LOG'
</pre>
<p>ORA-00314 ORA-00312这个错误比较常见,但是直接提示要求的 sequence# 6891 与 0 不匹配（后面不匹配的是0）的情况不常见.使用winhex打开redo文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/seq0.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/seq0.jpg" alt="seq0" width="1188" height="759" class="alignnone size-full wp-image-12265" /></a><br />
<hr />
这里比较明显的redo的sequence变为了0,初步看感觉是被触发了logfile clear操作导致（我查找了故障前后的alert日志确认没有人工clear操作redolog）,但是数据库实例恢复刚好需要这个redo,因此数据库无法正常打开,基于这种情况,考虑重建ctl,然后强制打开库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; @rectl

CREATE CONTROLFILE REUSE DATABASE &quot;ORCL&quot; NORESETLOGS  NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01229: data file 1 is inconsistent with logs
ORA-01110: data file 1: 'H:\BAIDUNETDISK\ORCL\SYSTEM01.DBF'
</pre>
<p>由于redo异常导致noresetlogs方式重建ctl报ORA-01229错误.对于这样的情况使用resetlogs方式重建成功,然后强制打开库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database using backup controlfile;
ORA-00279: change 178744591 generated at 07/18/2026 18:55:48 needed for thread
1
ORA-00289: suggestion :
C:\APP\XFF\PRODUCT\11.2.0.1\DBHOME_1\RDBMS\ARC0000006891_1176155303.0001
ORA-00280: change 178744591 for thread 1 is in sequence #6891


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
H:\BAIDUNETDISK\ORCL\REDO03.LOG
ORA-00339: 归档日志未包含任何重做
ORA-00334: 归档日志: 'H:\BAIDUNETDISK\ORCL\REDO03.LOG'


SQL&gt; recover database using backup controlfile;
ORA-00279: change 178744591 generated at 07/18/2026 18:55:48 needed for thread
1
ORA-00289: suggestion :
C:\APP\XFF\PRODUCT\11.2.0.1\DBHOME_1\RDBMS\ARC0000006891_1176155303.0001
ORA-00280: change 178744591 for thread 1 is in sequence #6891


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
H:\BAIDUNETDISK\ORCL\REDO02.LOG
ORA-00339: 归档日志未包含任何重做
ORA-00334: 归档日志: 'H:\BAIDUNETDISK\ORCL\REDO02.LOG'


SQL&gt; E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG
SP2-0734: unknown command beginning &quot;E:\APP\ADM...&quot; - rest of line ignored.
SQL&gt; recover database using backup controlfile;
ORA-00279: change 178744591 generated at 07/18/2026 18:55:48 needed for thread
1
ORA-00289: suggestion :
C:\APP\XFF\PRODUCT\11.2.0.1\DBHOME_1\RDBMS\ARC0000006891_1176155303.0001
ORA-00280: change 178744591 for thread 1 is in sequence #6891


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
H:\BAIDUNETDISK\ORCL\REDO01.LOG
ORA-00310: 归档日志包含序列 6892; 要求序列 6891
ORA-00334: 归档日志: 'H:\BAIDUNETDISK\ORCL\REDO01.LOG'
</pre>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database using backup controlfile until cancel;
ORA-00279: change 178744591 generated at 07/18/2026 18:55:48 needed for thread
1
ORA-00289: suggestion :
C:\APP\XFF\PRODUCT\11.2.0.1\DBHOME_1\RDBMS\ARC0000006891_1176155303.0001
ORA-00280: change 178744591 for thread 1 is in sequence #6891


Specify log: {&lt;RET&gt;=suggested | filename | AUTO | CANCEL}
cancel
ORA-10879: error signaled in parallel recovery slave
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01194: 文件 1 需要更多的恢复来保持一致性
ORA-01110: 数据文件 1: 'H:\BAIDUNETDISK\ORCL\SYSTEM01.DBF'


SQL&gt; alter database open resetlogs;

Database altered.
</pre>
<p>然后使用expdp导出数据,提供dmp文件,完成本次恢复任务</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/last-mile-db-rescue.html" rel="bookmark" class="crp_title">接手一个只差临门一脚的数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/ora-00313-ora-00312.html" rel="bookmark" class="crp_title">删除redo导致ORA-00313 ORA-00312故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/07/%e5%88%86%e4%ba%abora-01113-ora-01110%e6%95%85%e9%9a%9c%e5%a4%84%e7%90%86%e8%bf%87%e7%a8%8b.html" rel="bookmark" class="crp_title">分享一次ORA-01113 ORA-01110故障处理过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/error-resetlogs-scn.html" rel="bookmark" class="crp_title">因为人工误操作导致resetlogs scn不一致恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/11/ora-00322-ora-00312.html" rel="bookmark" class="crp_title">ORA-00322 ORA-00312 恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/03/ora-00600kcrf_resilver_log_1%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORA-00600[kcrf_resilver_log_1]异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/04/%e6%81%a2%e5%a4%8d%e5%a4%87%e4%bb%bd%e6%8e%a7%e5%88%b6%e6%96%87%e4%bb%b6%e9%81%bf%e5%85%8dresetlogs%e6%96%b9%e5%bc%8f%e6%89%93%e5%bc%80%e6%95%b0%e6%8d%ae%e5%ba%93.html" rel="bookmark" class="crp_title">恢复备份控制文件避免resetlogs方式打开数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/08/ora-01245_ora-01110%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">system01.dbf文件被offline,导致数据库报ORA-01245 ORA-01110故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/04/oracle-recovery-tools-poweroff-recovery.html" rel="bookmark" class="crp_title">Oracle Recovery Tools快速恢复断电引起的无法正常启动数据库(ORA-01555,MISSING000等问题）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/08/ora-600-ksuloget2.html" rel="bookmark" class="crp_title">ORA-600 ksuloget2 恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/05/ora-00283-ora-01122-ora-01207.html" rel="bookmark" class="crp_title">存储故障后oracle报&#8212;ORA-01122/ORA-01207故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/01/orarecovery-ora-19909.html" rel="bookmark" class="crp_title">Oracle Recovery Tools快速恢复ORA-19909</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/ora-00314-ora-00312-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<dc:creator>惜分飞 (惜分飞)</dc:creator></item>
	</channel>
</rss>