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

<channel>
	<title>惜分飞 &#187; 非常规恢复</title>
	<atom:link href="https://www.xifenfei.com/category/database/oracle/oracle_backup_recover/unconventionality_recover/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, 07 Nov 2026 15:45:44 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>几乎动用了所有手段的Oracle故障恢复</title>
		<link>https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html#comments</comments>
		<pubDate>Sat, 01 Aug 2026 15:47:51 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[obet dbv]]></category>
		<category><![CDATA[obet extend]]></category>
		<category><![CDATA[obet merge]]></category>
		<category><![CDATA[oracle碎片]]></category>
		<category><![CDATA[OraScan]]></category>
		<category><![CDATA[rman强制提取文件]]></category>

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

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12254</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.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/block0-damage-bad-blocks-version-mismatch.html" target="_blank">记录block 0损坏,数据文件大量坏块,使用不当数据库版本恢复等各种操作之后的故障处理</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>今天一个恢复行业的朋友让我帮忙看一个oracle故障,说是vmdk文件被加密(加密破坏的很少)，然后他从里面恢复出来了oracle的数据库文件，客户那边拿到数据文件然后说有三个文件头(被重命名为.bak)损坏了,无法打开数据库,让我这边给他们分析处理.分析他们说的被破坏文件,确实有损坏(初步看是block 0)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/block0.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/block0.png" alt="block0" width="1186" height="805" class="alignnone size-full wp-image-12255" /></a><br />
<hr />
使用oracle自带的dbv进行检测</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;dbv file=H:\BaiduNetdisk\D\SYSTEM06.DBF.bak

DBVERIFY: Release 11.2.0.4.0 - Production on 星期五 7月 3 21:06:28 2026

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


DBV-00107: 未知标头格式 (85) (1311029317)
</pre>
<p>由于block 0损坏，oracle自带的dbv无法检测，使用obet的dbv功能进行检测(<a href="https://www.xifenfei.com/2026/01/obet-dbv.html" title="obet实现对数据文件坏块检测功能" rel="noopener" target="_blank">obet实现对数据文件坏块检测功能</a>)</p>
<pre class="brush: bash; title: ; notranslate">
===============================================
DBV (Data Block Verification) Report
Started: 2026-07-03 21:04:22
Block Size: 8192 bytes
Target File: ALL files in listfile
===============================================

File #1: H:\BaiduNetdisk\D\SYSTEM06.DBF.bak (12801 blocks) - Started: 2026-07-03 21:04:22
File #1: rfile=19 (0x00000013)  header_block_num=12800 (0x00003200)  filesize_status:OK
file 1, block 0: rdba error (expected 0, got 4083969), bad block
  File #1 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 0 checksum error, 1 rdba error

File #1: H:\BaiduNetdisk\D\TSP_XXXXS06.DBF.bak (4194303 blocks) - Started: 2026-07-03 21:04:22
File #1: rfile=24 (0x00000018)  header_block_num=4194302 (0x003FFFFE)  filesize_status:OK
file 1, block 0: rdba error (expected 0, got 1367117), bad block
  File #1 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 0 checksum error, 1 rdba error

File #1: H:\BaiduNetdisk\D\TSP_XXXXS07.DBF.bak (1933313 blocks) - Started: 2026-07-03 21:04:42
File #1: rfile=25 (0x00000019)  header_block_num=1933312 (0x001D8000)  filesize_status:OK
file 1, block 0: rdba error (expected 0, got 2445572), bad block
  File #1 completed: 0 all zero, 0 soft corrupted, 0 tailchk error, 0 checksum error, 1 rdba error


DBV completed at: 2026-07-03 21:04:51
===============================================
DBV Summary:
Total blocks checked: 6140414
Total all zero blocks found: 0
Total all rdba error blocks found: 3
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: 3
Execution time: 29.00 seconds
===============================================
</pre>
<p>通过检测确认这三个数据文件就是block 0损坏其他的数据块是ok的.检查其他数据文件发现有一个数据文件有近2w个坏块</p>
<pre class="brush: bash; title: ; notranslate">
DBVERIFY: Release 11.2.0.4.0 - Production on 星期五 7月 3 12:55:08 2026

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\ORCL\TSP_XXXX.DBF
页 409601 标记为损坏
Corrupt block relative dba: 0x01864001 (file 6, block 409601)
Bad header found during dbv: 
Data in bad block:
 type: 219 format: 1 rdba: 0xdf6e738f
 last change scn: 0xd7ed.50be2d8b seq: 0x44 flg: 0x52
 spare1: 0x39 spare2: 0x92 spare3: 0xb5c5
 consistency value in tail: 0x6e7debc9
 check value in block header: 0x6d54
 block checksum disabled

………………
DBVERIFY - 验证完成

检查的页总数: 4194302
处理的页总数 (数据): 1842107
失败的页总数 (数据): 0
处理的页总数 (索引): 2143604
失败的页总数 (索引): 0
处理的页总数 (其他): 13763
处理的总页数 (段)  : 0
失败的总页数 (段)  : 0
空的页总数: 437
标记为损坏的总页数: 194391
流入的页总数: 2
加密的总页数        : 0
最高块 SCN            : 1869110545 (9.1869110545)
</pre>
<p>对于这个文件,由于客户有部分rman备份,尝试通过备份找出来这个文件历史文件</p>
<pre class="brush: bash; title: ; notranslate">
RMAN&gt; run
2&gt; {
3&gt; set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\TSP_XXXX.DBF' 
4&gt;   to 'H:\BaiduNetdisk\orcl\TSP_XXXX.DBF_rman';
5&gt; restore datafile 6;
6&gt; }

正在执行命令: SET NEWNAME

启动 restore 于 03-7月 -26
使用通道 ORA_DISK_1

通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 将数据文件 00006 还原到 H:\BaiduNetdisk\orcl\TSP_XXXX.DBF_rman
通道 ORA_DISK_1: 正在读取备份片段 H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250704_TC3TM4LJ_1_1.BAK.RESTORED0
通道 ORA_DISK_1: ORA-19870: 还原备份片段 H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250704_TC3TM4LJ_1_1.BAK.RESTORED0 时出错
ORA-19599: 块编号 1065697 已在 backup piece H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250704_TC3TM4LJ_1_1.BAK.RESTORED0 中损 坏

故障转移到上一个备份

通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 将数据文件 00006 还原到 H:\BaiduNetdisk\orcl\TSP_XXXX.DBF_rman
通道 ORA_DISK_1: 正在读取备份片段 H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250703_T33TJG9L_1_1.BAK
通道 ORA_DISK_1: ORA-19870: 还原备份片段 H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250703_T33TJG9L_1_1.BAK 时出错
ORA-19599: 块编号 95352 已在 backup piece H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250703_T33TJG9L_1_1.BAK 中损坏

故障转移到上一个备份

通道 ORA_DISK_1: 正在开始还原数据文件备份集
通道 ORA_DISK_1: 正在指定从备份集还原的数据文件
通道 ORA_DISK_1: 将数据文件 00006 还原到 H:\BaiduNetdisk\orcl\TSP_XXXX.DBF_rman
通道 ORA_DISK_1: 正在读取备份片段 H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250702_SQ3TGRTU_1_1.BAK
通道 ORA_DISK_1: 段句柄 = H:\BAIDUNETDISK\BACKDB\FULLDB_ORCL_20250702_SQ3TGRTU_1_1.BAK 标记 = TAG20250702T000518
通道 ORA_DISK_1: 已还原备份片段 1
通道 ORA_DISK_1: 还原完成, 用时: 00:28:56
完成 restore 于 03-7月 -26

RMAN&gt; exit
</pre>
<p>运气还不错,从备份里面找一份好的该文件的备份,然后通过使用该文件好的block替换最初损坏的block,实现该文件无坏块(由于这个文件比较靠前,而且已经写满,所以只差3天左右数据可能改变很小,因此可以采用这种替代方法最大限度恢复数据).数据文件检测和明显坏块处理完成,接下来开始打开数据库操作.<br />
由于我这边的数据文件路径和原库的不一致,修改ctl中的datafile 路径报ORA-17503错误<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/rename.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/rename.png" alt="rename" width="1423" height="326" class="alignnone size-full wp-image-12256" /></a><br />
<hr />
对于这些情况，通过修复block 0,然后尝试重命名数据文件成功</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database rename file 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\TSP_XXX06.DBF' to 'H:\BaiduNetdisk\orcl\TSP_XXX06.DBF'
  2  ;

数据库已更改。

SQL&gt; alter database rename file 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\TSP_XXX07.DBF' to 'H:\BaiduNetdisk\orcl\TSP_XXX07.DBF'
  2  ;

数据库已更改。

SQL&gt; alter database rename file 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM06.DBF' to 'H:\BaiduNetdisk\orcl\SYSTEM06.DBF'
  2  ;

数据库已更改。
</pre>
<p>然后尝试打开数据库成功</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database;
完成介质恢复。
SQL&gt; alter database open;

数据库已更改。
</pre>
<p>尝试expdp导出数据,结果报UDE-22303</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;expdp &quot;'/ as sysdba'&quot; full=y dumpfile=expdp_0703_%U.dmp DIRECTORY=expdp_dir logfile=expdp_0703.log 
 parallel=4 compression=all EXCLUDE=STATISTICS,AUDIT

Export: Release 11.2.0.4.0 - Production on 星期五 7月 3 13:10:12 2026

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

UDE-22303: 操作产生了 ORACLE 错误 22303
OCI-22303: 未找到类型 &quot;SYS&quot;.&quot;KU$_STATUS1020&quot;
</pre>
<p>正常打开的数据库,没有明显坏块,出现这个错误,理论上不太应该,怀疑是客户的版本问题,查询组件版本<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/07/v1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/07/v1.png" alt="v1" width="529" height="936" class="alignnone size-full wp-image-12257" /></a><br />
<hr />
确认该数据库版本可能是11.2.0.1而不是我现在看到的数据文件头为11.2.0.4,查询WRM$_DATABASE_INSTANCE,确认数据库之前版本是11.2.0.1.对于这种情况,直接简单的把compatible从11.2.0.4修改为11.2.0.0肯定不行,因为ctl,dbf,redo里面都写了11.2.0.4的信息<br />
1. ctl报版本不匹配</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; startup mount pfile='i:/pfile.txt';
ORACLE 例程已经启动。

Total System Global Area 3206836224 bytes
Fixed Size                  2180024 bytes
Variable Size             654314568 bytes
Database Buffers         2533359616 bytes
Redo Buffers               16982016 bytes
ORA-00201: ?????? 11.2.0.4.0 ? ORACLE ?? 11.2.0.0.0 ???
ORA-00202: ????: ''H:\BAIDUNETDISK\ORCL\CONTROL01.CTL''
</pre>
<p>2. 这种情况需要rectl,然后报dbf版本不对</p>
<pre class="brush: bash; title: ; notranslate">
CREATE CONTROLFILE REUSE DATABASE &quot;ORCL&quot; NORESETLOGS  NOARCHIVELOG
*
第 1 行出现错误:
ORA-01503: CREATE CONTROLFILE ??
ORA-01130: ??????? 11.2.0.4.0 ? ORACLE ?? 11.2.0.0.0 ???
ORA-01110: ???? 1: 'H:\BAIDUNETDISK\ORCL\SYSTEM01.DBF'
</pre>
<p>这种情况,dbf中的版本信息无法通过重建解决,只能使用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; set file 25
filename set to: H:\BAIDUNETDISK\ORCL\TSP_XXXX07.DBF (file#25)

OBET&gt; set offset 24
offset set to: 24

OBET&gt; m 0000

Confirm modification:
File: H:\BAIDUNETDISK\ORCL\TSP_XXXX07.DBF
Block: 1
Offset: 24 (file offset: 0x00002018)
Original value: 0004
New value:      0000
Confirm? (Y/YES to proceed): y
Verification successful: Data written correctly.
Modified 2 bytes at offset 0x00002018 successfully.

OBET&gt; sum apply

Confirm applying checksum:
File: H:\BAIDUNETDISK\ORCL\TSP_XXXX07.DBF
Block: 1
Offset in block: 16 (file offset: 0x00002010)
Original value: 0x94C3
New value:      0x94C7
Confirm? (Y/YES to proceed): y
Verification successful: Stored checksum matches calculated value (0x94C7).
Checksum applied successfully.

OBET&gt;
</pre>
<p>然后重建ctl报redo版本不兼容ORA-00331</p>
<pre class="brush: bash; title: ; notranslate">
CREATE CONTROLFILE REUSE DATABASE &quot;ORCL&quot; NORESETLOGS  NOARCHIVELOG
*
第 1 行出现错误:
ORA-01503: CREATE CONTROLFILE 失败
ORA-00331: 日志版本 0.0.0.0.0 与 ORACLE 版本 11.2.0.0.0 不兼容
ORA-01517: 日志成员: 'H:\BAIDUNETDISK\ORCL\REDO01.LOG'
</pre>
<p>采用resetlogs方式重建(不读取redo信息),重建ctl成功,然后直接打开数据库</p>
<pre class="brush: bash; title: ; notranslate">
 37  CHARACTER SET AL32UTF8
 38  ;

控制文件已创建。

SQL&gt; alter database open resetlogs;

数据库已更改。
</pre>
<p>然后expdp导出数据完成本次恢复任务</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/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/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/07/ora-01210.html" rel="bookmark" class="crp_title">快速处理 ORA-01210: data file header is media corrupt 故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/06/oracle-dbf-32k-recovery.html" rel="bookmark" class="crp_title">数据库文件变成32k故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/06/hardware-failure-datafile-recovery.html" rel="bookmark" class="crp_title">硬件故障后数据文件大小不对故障处理&#8212;Oracle碎片扫描恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/ora-00314-ora-00312-recovery.html" rel="bookmark" class="crp_title">ORA-00314: log 3 of thread 1, expected sequence# N doesn&#8217;t match 0</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/obet-csc-higher-than-block-scn.html" rel="bookmark" class="crp_title">obet修复csc higher than block scn类型坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-repair-system-open-db.html" rel="bookmark" class="crp_title">通过obet 恢复system坏块,打开数据库</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/09/obet-repair-oracle-block.html" rel="bookmark" class="crp_title">obet快速修复oracle 位图损坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/obet-miss-archivelog-recovery.html" rel="bookmark" class="crp_title">obet快速修改scn/resetlogs恢复数据库(缺少归档,ORA-00308）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/oracle-comprehensive-failure-recovery.html" rel="bookmark" class="crp_title">几乎动用了所有手段的Oracle故障恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/07/block0-damage-bad-blocks-version-mismatch.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dd破坏包含50多个pdb的asm 磁盘组恢复</title>
		<link>https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-recovery.html#comments</comments>
		<pubDate>Sat, 27 Jun 2026 14:00:11 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle ASM]]></category>
		<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[asm dd恢复]]></category>
		<category><![CDATA[asm disk dd恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12228</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-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/06/dd-asmdisk-50pdb-recovery.html" target="_blank">dd破坏包含50多个pdb的asm 磁盘组恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>前段时间刚刚恢复了一个客户dd了34个磁盘中的2个磁盘的1-2G多的数据（<a href="https://www.xifenfei.com/2026/01/dd-asm-recovery.html" title="在生产环境错误执行dd命令破坏asm磁盘故障恢复" rel="noopener" target="_blank">在生产环境错误执行dd命令破坏asm磁盘故障恢复</a>），这次又遇到一个客户dd了asm 的两个磁盘的100m和10m，这次故障麻烦的是由于dd了disk 0和disk 1，ausize为4M，有50多个pdb在该磁盘组中，相对恢复比较麻烦，通过不懈努力，最后终于最大限度恢复客户数据，避免了进一步的损失<br />
<strong>故障误操作</strong><br />
近期又一个可以误执行了dd命令，破坏了生产库的两个asm disk磁盘<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/11.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/11.jpg" alt="1" width="1037" height="454" class="alignnone size-full wp-image-12229" /></a><br />
<hr />
上述截图中可以确认两个信息<br />
1.sdh盘被dd掉了10m，sdg盘被dd掉了100M<br />
2.sdg对应的是asm-data1，sdh对应的是asm-data2<br />
dd误操作之后，data磁盘组开始报错，然后直接dismount.<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/2.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/2.jpg" alt="2" width="1366" height="491" class="alignnone size-full wp-image-12230" /></a><br />
<hr />
<strong>分析原磁盘组中asm磁盘情况</strong><br />
1.确定损坏磁盘在磁盘组中位置<br />
通过asm的alert日志分析损坏的盘对应的磁盘组信息<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/3.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/3.jpg" alt="3" width="800" height="288" class="alignnone size-full wp-image-12231" /></a><br />
<hr />
基于这个信息，我们可以确认asm-data1 对应的是DATA磁盘组的disk 0，asm-data2对应的是DATA磁盘组的disk 1，也就是说现在DATA磁盘组的0号盘被dd了100M，1号盘被dd了10m<br />
2.确认ausize大小<br />
通过分析该磁盘组的其他磁盘确认ausize大小<br />
kfdhdb.ausize:                  4194304 ; 0x0bc: 0&#215;00400000<br />
可以确认该磁盘组的au大小为4M<br />
3.磁盘组后续进行了一次加盘扩容<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/41.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/41.jpg" alt="4" width="963" height="433" class="alignnone size-full wp-image-12232" /></a><br />
<hr />
在25年6月份，对data磁盘组加了三块盘<br />
4.sdh(asm-data2)磁盘还被加入到了arch磁盘组中<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/51.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/51.jpg" alt="5" width="971" height="764" class="alignnone size-full wp-image-12233" /></a><br />
<hr />
比较幸运由于在另外一个节点上sdh磁盘权限没有正确修改，导致该增加没有完全成功，也就是该磁盘没有被reblance（如果加入成功并正常reblance，那后果比现在严重很多）<br />
5.通过结合asm日志以及kfed，磁盘物理大小等信息，并且通过kfed构造出来损坏的磁盘头信息，列出故障之前DATA磁盘组所有磁盘的情况（为了避免udev别名带来的影响，我直接使用物理磁盘名称来显示）<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/6.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/6.jpg" alt="6" width="1286" height="257" class="alignnone size-full wp-image-12234" /></a><br />
<hr />
<strong>客户现场情况说明</strong><br />
1.客户有一个大概1年多之前的dataguard（后续没有继续同步），已经进行了failover激活<br />
2.客户的备份系统中有一个大概1个月之前的备份，但是备份库缺少归档，我接手之时，已经被维护厂商强制拉起<br />
3.在我恢复之前，有专业的工程师已经对其这个现场进行了分析，但是没有拿出好的恢复方案<br />
<strong>恢复难点说明</strong><br />
1.该磁盘组的disk 0 被dd掉了100M，这个导致kfdhdb.f1b1locn记录被清空，也就无法获取到存储指向ASM file 1 文件目录表，这个值虽然被清空，但是根据经验或者对比其他磁盘组的disk 0 可以确认指定aun为10<br />
2.f1b1locn指向的au中存储中asm元数据1-255以及256-1023的file的前面60个au的extent映射表，由于这个在aun为10（也就是aun*aus=40M）的位置，但是这个位置也已经被dd掉了，从原理上业务文件256-1023的前面60个au的extent映射表彻底丢失<br />
3.通过工具扫描，发现存储别名信息的au也在disk 0的前面100M之内(也被dd掉了),导致通过别名直接定位文件的起点的恢复思路也不可行，而且别名丢失导致以别名的数据文件后续识别有一定的难度（无法获取asm里面文件的完整路径）<br />
4.该库有50多套pdb组成，也就意味着通过数据库碎片扫描的方式无法恢复（因为每个pdb里面都是由默认的种子创建而成，也就意味着rfile 1,4,9是重复的）<br />
5.由于中途加过一次磁盘，因引起这个asm里面的文件进行重新reblance，使得部分文件同一个block记录在不同磁盘的au上(数据文件块可能重复)<br />
6.由于该磁盘组中asm disk 大小不等，导致文件au分布在各个磁盘上不均匀，无明显规律可循<br />
<strong>恢复操作</strong><br />
1.通过kfed对损坏的asm-data1、asm-disk2的磁盘头进行构造，便于后续的恢复工具识别<br />
2.通过工具对data中所有磁盘进行扫描，主要扫描文件extent映射表信息和ACD中关于asm文件的分配信息<br />
2.1> 通过对这些信息进行综合分析，确认asm file >=1024的文件的extent映射表信息完整，数据可以直接恢复，效果类似<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/7.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/7.jpg" alt="7" width="618" height="407" class="alignnone size-full wp-image-12235" /></a><br />
<hr />
2.2> 对于256-1023号文件通过asm file的extent信息缺少0-59 au的数据，结合acd中获取的部分au分配信息，可以尽可能完整的恢复出来这些数据(由于disk 0中的acd信息丢失,所以不是100%完整)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/8.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/8.jpg" alt="8" width="769" height="596" class="alignnone size-full wp-image-12236" /></a><br />
<hr />
3.对于绝对文件号非1,4,9的文件，而且asm file 小于1024的数据文件，结合rdba碎片重组的方式再一次进行恢复，避免上面2.2中恢复中前面240M(60个au)，有部分au信息丢失导致文件不完整的情况<br />
通过上述多种方法恢复，整体恢复数据文件类似（由于文件较多，存放多个目录和根据规则取了多种名字）<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/9.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/9.jpg" alt="9" width="1271" height="418" class="alignnone size-full wp-image-12237" /></a><br />
<hr />
4.由于asm的文件目录，别名信息全部丢失，而且该库有50多个pdb，无法确认恢复出来的上千个文件和pdb对应的关系，对于这种情况，临时写了一个小程序，对这些文件进行读取，获取file#,rfile#,ts#,tsname,文件大小,dbid,dbname,scn等信息(<a href="https://www.xifenfei.com/2025/11/obet-version2.html" title="obet(Oracle Block Editor Tool)第二版发布" rel="noopener" target="_blank">obet(Oracle Block Editor Tool)第二版发布</a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/10.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/10.jpg" alt="10" width="1524" height="757" class="alignnone size-full wp-image-12238" /></a><br />
<hr />
通过把这些信息和历史的控制文件中的信息进行匹配，确认各个文件所属的pdb关系<br />
5.通过4中获取的文件和pdb对应关系然后通过dbms_pdb.recover包实现把恢复的文件插入到新的cdb库中，在这个插入和open库过程中遇到各种错误，都一一解决<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/111.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/111.jpg" alt="11" width="646" height="131" class="alignnone size-full wp-image-12239" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/12.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/12.jpg" alt="12" width="693" height="162" class="alignnone size-full wp-image-12240" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/13.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/13.jpg" alt="13" width="758" height="127" class="alignnone size-full wp-image-12241" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/14.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/14.jpg" alt="14" width="1207" height="262" class="alignnone size-full wp-image-12242" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/15.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/15.jpg" alt="15" width="1082" height="451" class="alignnone size-full wp-image-12243" /></a><br />
<hr />
6.最终完成客户数据恢复要求（为了保证数据不被再次修改，客户要求所有恢复的pdb不能打开到读写模式）<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/16.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/16.jpg" alt="16" width="522" height="865" class="alignnone size-full wp-image-12244" /></a><br />
<hr />
然后由客户的运维厂商或者应用厂商把需要的数据迁移或者整合到新库中并恢复业务，完成本次恢复任务</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/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/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/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/10/bres-dmp-recovery.html" rel="bookmark" class="crp_title">.bres勒索病毒加密数据库dmp文件可恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/01/hgdb-rm-rf-recovery.html" rel="bookmark" class="crp_title">记录一次国产数据库被rm -rf /*删除的救援过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/air-db-recovery.html" rel="bookmark" class="crp_title">.[xueyuanjie@onionmail.org].AIR勒索加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/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/08/redo-corrupt-recovery.html" rel="bookmark" class="crp_title">不太常见的10.2.0.1的oracle redo损坏恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/06/dd-asmdisk-50pdb-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle数据库系统回滚段异常处理-ORA-600 4137/4193</title>
		<link>https://www.xifenfei.com/2026/06/ora-600-4137-system-rollback.html</link>
		<comments>https://www.xifenfei.com/2026/06/ora-600-4137-system-rollback.html#comments</comments>
		<pubDate>Thu, 25 Jun 2026 11:21:36 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[ORA-60 4193]]></category>
		<category><![CDATA[ORA-600 4137]]></category>
		<category><![CDATA[update undo$]]></category>
		<category><![CDATA[系统回滚段损坏]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12222</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/06/ora-600-4137-system-rollback.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/06/ora-600-4137-system-rollback.html" target="_blank">Oracle数据库系统回滚段异常处理-ORA-600 4137/4193</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>最初是由于数据库sysaux文件无法正常恢复,重建ctl抛弃sysaux文件,然后打开数据库,但是无法expdp导出数据</p>
<pre class="brush: bash; title: ; notranslate">
Export: Release 12.2.0.1.0 - Production on Wed Jun 24 17:18:04 2026
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_SCHEMA_02 for user SYS
ORA-06512: at &quot;SYS.KUPV$FT&quot;, line 1140
ORA-06512: at &quot;SYS.KUPV$FT&quot;, line 1741
ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 95
ORA-06512: at &quot;SYS.KUPV$FT_INT&quot;, line 823
ORA-39080: failed to create queues &quot;KUPC$C_1_20260624171804&quot; and &quot;&quot; for Data Pump job
ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 95
ORA-06512: at &quot;SYS.KUPC$QUE_INT&quot;, line 1541
ORA-00376: file 3 cannot be read at this time
ORA-06512: at &quot;SYS.DBMS_AQADM&quot;, line 742
ORA-06512: at &quot;SYS.DBMS_AQADM_SYS&quot;, line 8060
ORA-01110: data file 3: '/u01/app/oracle/product/12.2.0.1/dbhome_2/dbs/MISSING00003'
ORA-06512: at &quot;SYS.DBMS_AQADM_SYSCALLS&quot;, line 912
ORA-06512: at &quot;SYS.DBMS_AQADM_SYS&quot;, line 8036
ORA-06512: at &quot;SYS.DBMS_AQADM&quot;, line 737
ORA-06512: at &quot;SYS.KUPC$QUE_INT&quot;, line 1461
ORA-06512: at line 1
ORA-06512: at &quot;SYS.KUPC$QUEUE_INT&quot;, line 158
ORA-06512: at &quot;SYS.KUPV$FT_INT&quot;, line 758
ORA-06512: at &quot;SYS.KUPV$FT&quot;, line 1645
ORA-06512: at &quot;SYS.KUPV$FT&quot;, line 1101
</pre>
<p>然后通过各方人员一顿操作猛如虎,导致数据库启动报ORA-600 4137和ORA-600 4193错误,数据库无法open成功</p>
<pre class="brush: bash; title: ; notranslate">
2026-06-24T18:38:50.158906+08:00
alter database open
2026-06-24T18:38:50.182720+08:00
Ping without log force is disabled:
  instance mounted in exclusive mode.
2026-06-24T18:38:50.219449+08:00
…………
2026-06-24T18:38:50.514016+08:00
ARC3: Archival started
ARCH: STARTING ARCH PROCESSES COMPLETE
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_48840.trc  (incident=304968):
ORA-00600: internal error code, arguments: [4137], [0.77.1546], [0], [0], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_304968/orcl1_ora_48840_i304968.trc
Use ADRCI or Support Workbench to package the incident.
ORACLE Instance orcl1 (pid = 53) - Error 600 encountered while recovering transaction (0, 77).
2026-06-24T18:38:51.313973+08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_48840.trc:
ORA-00600: internal error code, arguments: [4137], [0.77.1546], [0], [0], [], [], [], [], [], [], [], []
2026-06-24T18:38:51.649361+08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_48840.trc  (incident=304969):
ORA-00600: internal error code, arguments: [4193], [1112], [1122], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_304969/orcl1_ora_48840_i304969.trc
2026-06-24T18:38:53.412782+08:00
opiodr aborting process unknown ospid (48840) as a result of ORA-603
</pre>
<p>需要open故障库,并且正常导出数据,需要处理两个问题<br />
1. 被抛弃的sysaux文件需要正常online起来，不然expdp无法正常导出用户或者全库数据<br />
2. 需要解决open过程的ORA-600 4137/ORA-600 4193错误<br />
对于sysaux文件进行检查，由于重建ctl没有包含异常的sysaux文件，因此无法直接从库中查询到当前各种文件头相关情况,通过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>)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/res.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/res.jpg" alt="res" width="2050" height="398" class="alignnone size-full wp-image-12223" /></a><br />
<hr />
对于这种情况，可以使用obet的修改文件头checkpoint scn和resetlogs scn功能进行快速修复</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; set file 2
filename set to: /u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf (file#2)

OBET&gt; backup
Created backup directory: backup_blk
Successfully backed up block 1 from current file to /tmp/backup_blk/o1_mf_sysaux_go991cmw_.dbf_1.20260624191357

OBET&gt; copy chkscn file 1 to file 2
Error: Edit mode not enabled. Use 'set mode edit' first.

OBET&gt; set mode edit
mode set to: edit

OBET&gt; copy chkscn file 1 to file 2

Confirm Modify chkscn:
Source: file#1 (/u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_system_go990lcg_.dbf)
Target: file#2 (/u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf)
Proceed? (Y/YES to confirm): yes
Successfully copied checkpoint SCN information from file#1 to file#2.

OBET&gt; copy resetlogscn file 1 to file 2

Confirm Modify resetlogscn:
Source: file#1 (/u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_system_go990lcg_.dbf)
Target: file#2 (/u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf)
Proceed? (Y/YES to confirm): yes
Successfully copied resetlog SCN information from file#1 to file#2.

OBET&gt; sum
Check value for File /u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf, Block 1:
current = 0xF21B, required = 0x6651

OBET&gt; sum apply

Confirm applying checksum:
File: /u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf
Block: 1
Offset in block: 16 (file offset: 0x00002010)
Original value: 0xF21B
New value:      0x6651
Confirm? (Y/YES to proceed): y
Verification successful: Stored checksum matches calculated value (0x6651).
Checksum applied successfully.

OBET&gt; tailchk
Check tailchk for File /u02/app/oracle/oradata/PYJHYSYS/PYJHYSYS/datafile/o1_mf_sysaux_go991cmw_.dbf, Block 1:
current = 0x010B0000, required = 0x010B0000

OBET&gt;
</pre>
<p>然后重建ctl，包含该sysaux，尝试打开数据库,报ORA-600 4193错误</p>
<pre class="brush: sql; title: ; notranslate">
SYS@ORCL&gt; alter database open ;
alter database open 
*
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4193], [1112], [1122], [], [], [], [], [], [], [], [], []
Process ID: 93550
Session ID: 1123 Serial number: 55884
</pre>
<p>进一步跟踪启动过程，确认报错在update undo$上</p>
<pre class="brush: bash; title: ; notranslate">

PARSING IN CURSOR 
#140446136869016
 len=160 dep=1 uid=0 oct=6 lid=0 tim=3161302405543 hv=1292341136 ad='9bbd4828' sqlid='8vyjutx6hg3wh'
update /*+ rule */ undo$ set name=:2,file#=:3,block#=:4,status$=:5,user#=:6,undosqn=:7,
xactsqn=:8,scnbas=:9,scnwrp=:10,inst#=:11,ts#=:12,spare1=:13 where us#=:1
END OF STMT
PARSE 
#140446136869016
:c=11966,e=11918,p=18,cr=94,cu=0,mis=1,r=0,dep=1,og=3,plh=0,tim=3161302405542
BINDS 
#140446136869016
:
 Bind
#0
  oacdty=01 mxl=32(21) mxlc=00 mal=00 scl=00 pre=00
  oacflg=18 fl2=0001 frm=01 csi=852 siz=32 off=0
  kxsbbbfp=9bbdac32  bln=32  avl=21  flg=09
  value=&quot;_SYSSMU12_3861134380$&quot;
 Bind
#1
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda370  bln=24  avl=02  flg=05
  value=5
 Bind
#2
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda340  bln=24  avl=03  flg=05
  value=144
 Bind
#3
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda310  bln=24  avl=02  flg=05
  value=5
 Bind
#4
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda2e0  bln=24  avl=02  flg=05
  value=1
 Bind
#5
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda2b0  bln=24  avl=04  flg=05
  value=46221
 Bind
#6
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda280  bln=24  avl=05  flg=05
  value=30810931
 Bind
#7
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda250  bln=24  avl=06  flg=05
  value=3399756014
 Bind
#8
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda220  bln=24  avl=03  flg=05
  value=2429
 Bind
#9
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda1f0  bln=24  avl=02  flg=05
  value=2
 Bind
#10
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda1c0  bln=24  avl=02  flg=05
  value=4
 Bind
#11
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda190  bln=24  avl=02  flg=05
  value=2
 Bind
#12
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=1000001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fbc23eda3a0  bln=22  avl=02  flg=05
  value=12
WAIT 
#140446136869016
: nam='db file sequential read' ela= 16 file#=1 block#=547 blocks=1 obj#=0 tim=3161302406306
2026-06-24T19:59:40.979075+08:00
ORA-00600: internal error code, arguments: [4193], [1112], [1122], [], [], [], [], [], [], [], [], []
</pre>
<p>alert日志中还有ORA-600 4137等错误</p>
<pre class="brush: bash; title: ; notranslate">
ORACLE Instance orcl1 (pid = 53) - Error 600 encountered while recovering transaction (0, 77).
2026-06-24T19:59:40.387459+08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_83245.trc:
ORA-00600: internal error code, arguments: [4137], [0.77.1546], [0], [0], [], [], [], [], [], [], [], []
</pre>
<p>通过这个报错,可以确认是由于0号回滚段,也就是rollback中事务异常，获取相关的trace</p>
<pre class="brush: bash; title: ; notranslate">
[TOC00003]
----- Beginning of Customized Incident Dump(s) -----
XID passed in = xid: 0x0000.04d.0000060a
XID from Undo block = xid: 0x0000.060.00000600
Dump of buffer cache at level 7 for pdb=0 tsn=0 rdba=4194432
BH (0x3ddfd26b8) file#: 1 rdba: 0x00400080 (1/128) class: 15 ba: 0x3ddb80000
  set: 166 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 0,0
  dbwrid: 3 obj: -1 objn: 0 tsn: [0/0] afn: 1 hint: f
  hash: [0x3ddece808,0xc6bdc2d8] lru: [0xbc1db108,0xbc1db108]
  ckptq: [NULL] fileq: [NULL]
  objq: [0xa2267bc0,0xa2267bc0] objaq: [0xa2267bb0,0xa2267bb0]
  st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' fscn: 0x980cfff669f tch: 1
  flags:
  LRBA: [0x0.0.0] LSCN: [0x0] HSCN: [0x0] HSUB: [65535]
  Printing buffer operation history (latest change first):
  cnt: 10
  01. sid:00 L353:gcur:set:MEXCL      02. sid:00 L145:zib:mk:EXCL       
  03. sid:00 L212:zib:bic:FSQ         04. sid:00 L122:zgb:set:st        
  05. sid:00 L830:olq1:clr:WRT+CKT    06. sid:00 L951:zgb:lnk:objq      
  07. sid:00 L372:zgb:set:MEXCL       08. sid:00 L123:zgb:no:FEN        
  09. sid:00 L083:zgb:ent:fn          10. sid:01 L203:w_ini_dc:bic:FVB  
  buffer tsn: 0 rdba: 0x00400080 (1/128)
  scn: 0x980cffc5958 seq: 0x01 flg: 0x04 tail: 0x59580e01
  frmt: 0x02 chkval: 0x2688 type: 0x0e=KTU UNDO HEADER W/UNLIMITED EXTENTS
</pre>
<p>基于这样的情况,可以判断通过清理undo$中的相关记录,让其重新分配新的回滚块</p>
<pre class="brush: bash; title: ; notranslate">
Block Header:
block type=0x0e (KTU UNDO HEADER W/UNLIMITED EXTENTS)
block format=0xa2 (oracle 10+)
block rdba=0x00400080 (file#=1, block#=128)
scn=0x0980.cff7c56d, seq=1, tail=0xc56d0e01
block checksum value=0x2683=9859, flag=4
  Extent Control Header
  -------------------------------------------------------------
  Extent Header:: extents: 10  blocks: 79
                  last map: 0x00000000  
#maps
: 0  offset: 4128
      Highwater:: 0x00400225  (rfile#=1,block#=549)
                  ext#: 6  blk#: 5   ext size:8
      
#blocks
 in seg. hdr's freelists: 0
      
#blocks
 below: 0
      mapblk: 0x00000000   offset: 6
      Map Header:: next: 0x00000000   
#extents
: 10  obj#: 0  flag: 0x40000000
  Extent Control Header
  -------------------------------------------------------------
   0x00400081  length: 7
   0x004206a8  length: 8
   0x004206b0  length: 8
   0x00400088  length: 8
   0x00400210  length: 8
   0x00400218  length: 8
   0x00400220  length: 8
   0x00400228  length: 8
   0x004206a0  length: 8
   0x00400230  length: 8
  TRN CTL:: seq: 0x0462 chd: 0x005e ctl: 0x000d inc: 0x00000000 nbf: 0x0000
            mgc: 0x8002 xts: 0x0068 flg: 0x0001 opt: 2147483646(0x7ffffffe)
            uba: 0x00000225.0462.1d scn: 0x0980.cf1f2121
Version: 0x01
  FREE BLOCK POOL::
    uba: 0x00000000.0462.1c ext: 0x6  spc: 0x11a2
    uba: 0x00000000.0462.26 ext: 0x6  spc: 0xc86
    uba: 0x00000000.0462.03 ext: 0x6  spc: 0x1e5c
    uba: 0x00000000.0460.03 ext: 0x4  spc: 0x1e5c
    uba: 0x00000000.043c.21 ext: 0x8  spc: 0xd2c
</pre>
<p>然后数据库打开成功,使用expdp完美导出数据，完成本次恢复任务</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/12/kgegpa-recovery.html" rel="bookmark" class="crp_title">Exception [type: SIGSEGV, Address not mapped to object] [] [ kgegpa()+36]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/07/ora-01092-ora-00604-ora-08103.html" rel="bookmark" class="crp_title">ORA-01092 ORA-00604 ORA-08103故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/03/hardware-failure-oracle-recovery.html" rel="bookmark" class="crp_title">硬件恢复之后,数据库无法open故障恢复</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/2024/07/ora-600-6711.html" rel="bookmark" class="crp_title">数据库启动报ORA-600 6711故障分析处理</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/2013/06/oracle-12c-cdb%e4%b8%adpdb%e5%8f%82%e6%95%b0%e7%ae%a1%e7%90%86%e6%9c%ba%e5%88%b6.html" rel="bookmark" class="crp_title">ORACLE 12C CDB中PDB参数管理机制</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/2015/08/oracle%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d%e5%90%8eawr%e5%bc%82%e5%b8%b8%e5%a4%84%e7%90%86.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/2020/05/12-2-ora-007445-lmebucp.html" rel="bookmark" class="crp_title">12.2数据库启动报ORA-07445 lmebucp错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/07/%e6%95%b0%e6%8d%ae%e5%ba%93%e5%90%af%e5%8a%a8ora-08103%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d.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/2019/05/ora-600-kokasgi1-recovery.html" rel="bookmark" class="crp_title">ORA-600 kokasgi1故障恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/06/ora-600-4137-system-rollback.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>硬件故障后数据文件大小不对故障处理&#8212;Oracle碎片扫描恢复</title>
		<link>https://www.xifenfei.com/2026/06/hardware-failure-datafile-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/06/hardware-failure-datafile-recovery.html#comments</comments>
		<pubDate>Sun, 07 Jun 2026 10:21:47 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[DBV-00102]]></category>
		<category><![CDATA[oracle碎片]]></category>
		<category><![CDATA[oracle碎片恢复]]></category>
		<category><![CDATA[OraScan]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12189</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/06/hardware-failure-datafile-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/06/hardware-failure-datafile-recovery.html" target="_blank">硬件故障后数据文件大小不对故障处理&#8212;Oracle碎片扫描恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有硬件恢复圈朋友找到我,说硬件恢复之后dbv报dbv-00102错误,让我给看看是否可以处理<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/dbv-00102.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/dbv-00102.jpg" alt="dbv-00102" width="1431" height="667" class="alignnone size-full wp-image-12190" /></a><br />
<hr />
这个是oracle dbv中一种常见错误,一般是由于block 0 不对,或者是由于文件大小不对引起,让把恢复文件发给我,进行检查</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; select name,bytes/1024/1024/1024 from v$datafile_header;

NAME                                                                             BYTES/1024/1024/1024
-------------------------------------------------------------------------------- --------------------
H:\BAIDUNETDISK\ORADATA\XXXXORCL\SYSTEM01.DBF                                             2.080078125
H:\BAIDUNETDISK\ORADATA\XXXXORCL\SYSAUX01.DBF                                             2.880859375
H:\BAIDUNETDISK\ORADATA\XXXXORCL\UNDOTBS01.DBF                                           9.0087890625
H:\BAIDUNETDISK\ORADATA\XXXXORCL\USERS01.DBF                                          31.993408203125
H:\BAIDUNETDISK\ORADATA\XXXXORCL\USERS02.DBF                                                8.1640625
H:\BAIDUNETDISK\ORADATA\XXXXORCL\USERS03.DBF                                              7.958984375
H:\BAIDUNETDISK\ORADATA\XXXXORCL\USERS04.DBF                                              7.958984375
H:\BAIDUNETDISK\ORADATA\XXXXORCL\USERS05.DBF                                                 7.890625

已选择8行。
</pre>
<p>确定USER02-USERS05的dbf文件实际大小(数据文件头记录)在8G左右,但是目前恢复出来的文件大小只有4G左右<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/4g.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/4g.jpg" alt="4g" width="751" height="349" class="alignnone size-full wp-image-12191" /></a><br />
<hr />
在恢复工具中直接查看文件大小情况<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/rs.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/rs.jpg" alt="rs" width="882" height="305" class="alignnone size-full wp-image-12192" /></a><br />
<hr />
这里比较明显rs中虽然显示文件状态良好,但是实际大小也不对(得出经验:以后恢复中不能太依赖这个状态),根据反馈现场是三个盘的raid5,中途做了一次强制上线,然后客户也使用win pe拷贝过一次数据,大小和现在一样,也是少了近4G.第一反应可能是由于raid盘弄的不对,但是经过对其他文件的确认,多完全没有问题,排除了盘错误的问题,怀疑是由于文件系统异常导致,对于这种的情况,文件系统层面肯定无法恢复,考虑使用自研的OraScan工具进行扫描(<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/06/ora1.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/ora1.jpg" alt="ora1" width="955" height="428" class="alignnone size-full wp-image-12194" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/ora2.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/ora2.png" alt="ora2" width="949" height="535" class="alignnone size-full wp-image-12197" /></a><br />
<hr />
通过OraScan扫描找到相关block,并提取出来数据文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/06/file.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2026/06/file.jpg" alt="file" width="744" height="172" class="alignnone size-full wp-image-12196" /></a><br />
<hr />
使用dbv检测文件</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;dbv file=H:\BaiduNetdisk\xff\YFKJORCL.USERS.4.7.4.N.DBF

DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 6月 7 18:06:30 2026

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\XFF\YFKJORCL.USERS.4.7.4.N.DBF


DBVERIFY - 验证完成

检查的页总数: 1043200
处理的页总数 (数据): 67167
失败的页总数 (数据): 0
处理的页总数 (索引): 37995
失败的页总数 (索引): 0
处理的页总数 (其他): 861109
处理的总页数 (段)  : 0
失败的总页数 (段)  : 0
空的页总数: 76929
标记为损坏的总页数: 0
流入的页总数: 0
加密的总页数        : 0
最高块 SCN            : 347454063 (0.347454063)
</pre>
<p>把文件拷贝替换掉之前恢复的USERS02-USER05.DBF,然后尝试打开数据库</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover database ;
完成介质恢复。
SQL&gt; alter database open ;
alter database open
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结尾
进程 ID: 3308
会话 ID: 14 序列号: 3
</pre>
<p>查看alert日志分析原因</p>
<pre class="brush: bash; title: ; notranslate">
Sun Jun 07 14:43:51 2026
Recovery of Online Redo Log: Thread 1 Group 2 Seq 36464 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORADATA\YFKJORCL\REDO02.LOG
Completed: ALTER DATABASE RECOVER  database   
alter database open 
Beginning crash recovery of 1 threads
 parallel recovery started with 19 processes
Started redo scan
Completed redo scan
 read 2353 KB redo, 0 data blocks need recovery
Started redo application at
 Thread 1: logseq 36464, block 15876
Recovery of Online Redo Log: Thread 1 Group 2 Seq 36464 Reading mem 0
  Mem# 0: H:\BAIDUNETDISK\ORADATA\YFKJORCL\REDO02.LOG
Completed redo application of 0.00MB
Completed crash recovery at
 Thread 1: logseq 36464, block 20582, scn 347475303
 0 data blocks read, 0 data blocks written, 2353 redo k-bytes read
Sun Jun 07 14:43:57 2026
Errors in file c:\app\xff\diag\rdbms\yfkjorcl\o11201\trace\o11201_lgwr_2204.trc:
ORA-00314: ?? 3 (???? 1) ??? sequence# 36462 ? 32025 ???
ORA-00312: ???? 3 ?? 1: 'H:\BAIDUNETDISK\ORADATA\YFKJORCL\REDO03.LOG'
Errors in file c:\app\xff\diag\rdbms\yfkjorcl\o11201\trace\o11201_lgwr_2204.trc:
ORA-00314: ?? 3 (???? 1) ??? sequence# 36462 ? 32025 ???
ORA-00312: ???? 3 ?? 1: 'H:\BAIDUNETDISK\ORADATA\YFKJORCL\REDO03.LOG'
Errors in file c:\app\xff\diag\rdbms\yfkjorcl\o11201\trace\o11201_ora_3308.trc:
ORA-00314: 日志 1 (用于线程 ) 要求的 sequence#  与  不匹配
ORA-00312: 联机日志 3 线程 1: 'H:\BAIDUNETDISK\ORADATA\YFKJORCL\REDO03.LOG'
USER (ospid: 3308): terminating the instance due to error 314
Sun Jun 07 14:44:02 2026
Instance terminated by USER, pid = 3308
</pre>
<p>由于redo group 异常导致库无法正常open,但是由于已经recover database成功,因此大概率可以clear该redo 组</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         3 INACTIVE
         2 CURRENT

SQL&gt; alter database clear logfile group 3;

数据库已更改。

SQL&gt; alter database open;

数据库已更改。
</pre>
<p>数据库open成功，然后使用expdp导出数据,完成本次恢复任务.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/08/redo-corrupt-recovery.html" rel="bookmark" class="crp_title">不太常见的10.2.0.1的oracle redo损坏恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/09/ora-00354.html" rel="bookmark" class="crp_title">记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/ora-00314-ora-00312-recovery.html" rel="bookmark" class="crp_title">ORA-00314: log 3 of thread 1, expected sequence# N doesn&#8217;t match 0</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/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/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/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/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/04/ora-600-kcratr_nab_less_than_odr-202604.html" rel="bookmark" class="crp_title">一次运气好的ORA-600 kcratr_nab_less_than_odr故障处理</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/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/05/ora-600-2662-202605.html" rel="bookmark" class="crp_title">一次断电引起的Oracle故障恢复-ora-600 2662故障</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/06/hardware-failure-datafile-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>记录一次win删除数据文件完美恢复案例</title>
		<link>https://www.xifenfei.com/2026/03/win-rm-datafile-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/03/win-rm-datafile-recovery.html#comments</comments>
		<pubDate>Thu, 26 Mar 2026 03:58:00 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[oracle碎片]]></category>
		<category><![CDATA[OraFHR]]></category>
		<category><![CDATA[win删除文件恢复]]></category>
		<category><![CDATA[反删除恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=12053</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/03/win-rm-datafile-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/03/win-rm-datafile-recovery.html" target="_blank">记录一次win删除数据文件完美恢复案例</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户在操作系统层面删除了四个数据文件(数据库在关闭情况下直接删除物理文件),然后offline,启动数据库,结果发现被删除的数据文件是业务表空间的,导致大量业务访问报错<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/ORA-00376.jpg" alt="ORA-00376" width="1206" height="513" class="alignnone size-full wp-image-12054" /><br />
<hr />
通过数据库层面查询确认这些文件已经不存在<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/121.jpg" alt="121" width="546" height="147" class="alignnone size-full wp-image-12055" /><br />
<hr />
对于这样的情况,先尝试从文件系统层面尝试反删除恢复文件<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/0.jpg" alt="0" width="768" height="160" class="alignnone size-full wp-image-12056" /><br />
<hr />
由于删除文件之后,启动了数据库并写入了一些日志和数据导致被删除的文件的元数据信息彻底丢失,这种情况下基于文件系统的反删除恢复肯定无法需要的数据,对于这种情况,考虑进行碎片层面恢复,以前有过类似案例:<br />
<a href="https://www.xifenfei.com/2023/07/win-delete-datafile-recovery.html" title="win系统删除oracle数据文件恢复" rel="noopener" target="_blank">win系统删除oracle数据文件恢复</a><br />
<a href="https://www.xifenfei.com/2018/05/datafile-size-0k-recovery.html" title="Oracle 数据文件大小为0kb或者文件丢失恢复" rel="noopener" target="_blank">Oracle 数据文件大小为0kb或者文件丢失恢复</a><br />
<a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" title="删除数据库文件并部分覆盖情况下Oracle恢复" rel="noopener" target="_blank">删除数据库文件并部分覆盖情况下Oracle恢复</a><br />
通过底层扫描发现需要恢复的文件头部信息丢失,其他block完整(该文件本身不大,只有100M),扫描出来的数据块类似这样的结果<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/413.png" alt="413" width="618" height="52" class="alignnone size-full wp-image-12057" /><br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/414.png" alt="414" width="628" height="59" class="alignnone size-full wp-image-12058" /><br />
<hr />
这里比较幸运,丢失的block为1-3,也就是涉及文件头和一些位图信息,通过以前自研的OraFHR工具(<a href="https://www.xifenfei.com/2026/03/orafhr.html" title="Oracle数据库被勒索加密一键open工具–OraFHR" rel="noopener" target="_blank">Oracle数据库被勒索加密一键open工具–OraFHR</a>)进行重构文件头，再通过<a href="https://www.xifenfei.com/oracle-tools" title="自研Oracle恢复小工具" rel="noopener" target="_blank">oracle recovery tools</a>工具进行文件头的一些修复工作<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/03/orarec.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/03/orarec.png" alt="orarec" width="743" height="575" class="alignnone size-full wp-image-12060" /></a><br />
<hr />
再重建控制文件打开数据库,并完美导出数据,实现数据0丢失恢复<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/03/expdp.jpg" alt="expdp" width="595" height="268" class="alignnone size-full wp-image-12059" /><br />
<hr />
<div id="crp_related"><ul><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/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/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/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/2025/09/delete-df-some-overwrit-recovery.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/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/2022/04/win-fs-corruption-recovery.html" rel="bookmark" class="crp_title">win文件系统损坏oracle恢复</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/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/05/oracle-fault-first-scene-restore-chaotic-database.html" rel="bookmark" class="crp_title">Oracle故障第一现场被恢复混乱的数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/03/win-rm-datafile-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>文件系统损坏导致数据库异常故障处理</title>
		<link>https://www.xifenfei.com/2026/02/ntfs-bad-oracle-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/02/ntfs-bad-oracle-recovery.html#comments</comments>
		<pubDate>Fri, 20 Feb 2026 14:31:53 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[ORA-01122 ORA-01110 ORA-01200]]></category>
		<category><![CDATA[ORA-01200]]></category>
		<category><![CDATA[文件系统损坏oracle恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11994</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/02/ntfs-bad-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/02/ntfs-bad-oracle-recovery.html" target="_blank">文件系统损坏导致数据库异常故障处理</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户做了双机rose,由于某种故障导致共享存储在两个主机之间相互频繁挂载(甚至出现了同时挂载的情况),使得该文件系统发生损坏<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/02/ntfs.png" alt="ntfs" width="979" height="449" class="alignleft size-full wp-image-12001" /><br />
<hr />
修复双机故障之后,数据库启动ORA-01122 ORA-01110 ORA-01200错误<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/02/ora-1200.png" alt="ora-1200" width="850" height="236" class="alignleft size-full wp-image-11996" /><br />
<hr />
初步看这个报错，block差距有点大，文件头中记录为419840个block,现在实际有的block数量为384000,使用<a href="https://www.xifenfei.com/2025/11/obet.html" title="Oracle数据块编辑工具( Oracle Block Editor Tool)-obet" rel="noopener" target="_blank">obet</a>查看文件头记录block number情况</p>
<pre class="brush: bash; title: ; notranslate">
OBET&gt; p kcvfh.kcvfhhdr
File: E:\TEMP\20260219\SYSTEM01.DBF
Size: 8192 bytes
Block: 1
Offset: 20

struct kcvfhhdr, 76 bytes                   @20
   ub4 kccfhswv                            @20      0x00000000
   ub4 kccfhcvn                            @24      0x0B200400
   ub4 kccfhdbi                            @28      0x85D98FAB
   text kccfhdbn[8]                        @32-39   XXXX
   ub4 kccfhcsq                            @40      0x00091079
   ub4 kccfhfsz                            @44      0x00066800 &lt;&lt;--16转换为10进制为419840
   s_blkz kccfhbsz                         @48      0x00
   ub2 kccfhfno                            @52      0x0001
   ub2 kccfhtyp                            @54      0x0003
   ub4 kccfhacid                           @56      0x00000000
   ub4 kccfhcks                            @60      0x00000000
   text kccfhtag[32]                       @64-95

&lt;kcvfh.kcvfhhdr structure printed successfully&gt;
</pre>
<p>对于这种情况,以前有过很多次处理经验(一般办法2个:1>修改文件头的block数量记录;2>修改现在的文件大小和实际文件有匹配),以前类似的处理记录:<br />
 <a href="https://www.xifenfei.com/2013/05/bbed%e5%a4%84%e7%90%86ora-01200%e6%95%85%e9%9a%9c.html" title="bbed处理ORA-01200故障" rel="noopener" target="_blank">bbed处理ORA-01200故障</a><br />
<a href="https://www.xifenfei.com/2024/01/ora-01200-recovery.html" title="记录一次ORA-01200完美恢复" rel="noopener" target="_blank">记录一次ORA-01200完美恢复</a><br />
<a href="https://www.xifenfei.com/2023/07/ora-01122-ora-01200.html" title="ORA-01122 ORA-01200故障处理" rel="noopener" target="_blank">ORA-01122 ORA-01200故障处理</a><br />
处理完成system文件异常之后,sysaux文件继续异常</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; recover datafile 1;
完成介质恢复。
SQL&gt; recover datafile 2;
ORA-00283: 恢复会话因错误而取消
ORA-01110: 数据文件 2: 'Z:\APP\ADMINISTRATOR\ORADATA\XXXX\SYSAUX01.DBF'
ORA-01122: 数据库文件 2 验证失败
ORA-01110: 数据文件 2: 'Z:\APP\ADMINISTRATOR\ORADATA\XXXX\SYSAUX01.DBF'
ORA-01200: 149760 的实际文件大小小于 153600 块的正确大小
</pre>
<p>类似处理该故障之后,由于文件系统故障导致不少文件出现大量连续坏块（全0或者记录了其他文件内容的坏块）,这种是由于文件系统元数据异常导致,通过文件系统层面恢复继续无法正常处理,对于这样的情况,通过碎片扫描工具按照oracle block级别的文件重组(其实就是基于rdba信息进行重组),获取正确的数据块信息然后重新重组成数据文件<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2026/02/QQ20260220-005159.png" alt="QQ20260220-005159" width="1115" height="422" class="alignleft size-full wp-image-11997" /><br />
<hr />
然后打开数据库,顺利导出数据,实现客户数据最大限度恢复</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/07/oracle-8-0-5-recovery-2025.html" rel="bookmark" class="crp_title">2025年的Oracle 8.0.5数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/01/ora-01200-recovery.html" rel="bookmark" class="crp_title">记录一次ORA-01200完美恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/07/ora-01122-ora-01200.html" rel="bookmark" class="crp_title">ORA-01122 ORA-01200故障处理</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/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/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/2024/07/oracle-23ai-bbed.html" rel="bookmark" class="crp_title">Oracle 23ai依旧支持bbed</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/08/%e5%9c%a8win-64%e4%bd%8d%e5%b9%b3%e5%8f%b0%e4%b8%8a%e8%bf%90%e8%a1%8cbbed%e6%94%af%e6%8c%81oracle-10g-11g-12c.html" rel="bookmark" class="crp_title">在win 64位平台上运行bbed(支持ORACLE 10g 11g 12c)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/oracle-rm-rf-recovery.html" rel="bookmark" class="crp_title">linux rm -rf 删除数据文件恢复</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></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/02/ntfs-bad-oracle-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在生产环境错误执行dd命令破坏asm磁盘故障恢复</title>
		<link>https://www.xifenfei.com/2026/01/dd-asm-recovery.html</link>
		<comments>https://www.xifenfei.com/2026/01/dd-asm-recovery.html#comments</comments>
		<pubDate>Thu, 15 Jan 2026 16:07:00 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[asm dd recovery]]></category>
		<category><![CDATA[dd asmdisk恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11918</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2026/01/dd-asm-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/01/dd-asm-recovery.html" target="_blank">在生产环境错误执行dd命令破坏asm磁盘故障恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>由于ssh登录错误,客户对生产环境进行了误操作把系统的一块磁盘dd到另外两个磁盘上,由于及时发现立马进行了终止操作,但是还是分别破坏了一点数据(一块盘破坏了2G多,另外一块盘破坏了1G多)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/dd.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/dd.png" alt="dd" width="710" height="192" class="alignleft size-full wp-image-11919" /></a><br />
<hr />
通过分析udev的绑定关系确认被破坏的asm disk名称<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/udev.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/udev.png" alt="udev" width="736" height="501" class="alignleft size-full wp-image-11920" /></a><br />
<hr />
再通过asm alert日志确认破坏磁盘在asm disk中情况<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/asmdisk.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/asmdisk.png" alt="asmdisk" width="839" height="411" class="alignleft size-full wp-image-11921" /></a><br />
<hr />
通过上述信息基本上可以确认,asmdisk13被分别dd到了asmdisk11和asmdisk26中了部分<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/111.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/111.png" alt="11" width="760" height="621" class="alignleft size-full wp-image-11922" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/26.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/26.png" alt="26" width="912" height="621" class="alignleft size-full wp-image-11923" /></a><br />
<hr />
基于这种情况,由于asm disk被破坏了1-2G多,直接修复然后正常mount磁盘组基本上没有希望,经过分析以及与客户沟通,确认他们改系统是4节点组成的集群,1/2节点上面跑2套库,3/4节点上跑2套库,数据整体放在data_dg磁盘组中,需要恢复的库是第二个顺序创建的1套库(4套库中只需恢复一套即可),由于破坏的数据本身不多,而且需要恢复的数据不是最初写入asm磁盘组,基于这样的情况,需要恢复的数据库机会比较大.<br />
<br />
由于现在三个磁盘头信息一致(一个磁盘被dd到另外两个磁盘上),因此第一步先把损坏的两个磁盘头进行简单修复,为了便于amdu(<a href="https://www.xifenfei.com/2012/03/%e6%89%be%e5%9b%9easm%e4%b8%ad%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" title="找回ASM中数据文件" rel="noopener" target="_blank">找回ASM中数据文件</a>)等之类数据可以识别到正确的磁盘头信息,然后进行后续的数据文件提取恢复.使用工具对数据文件进行了批量提取,提取数据完成之后,尝试recover和open库<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/open.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/open.png" alt="open" width="500" height="291" class="alignleft size-full wp-image-11924" /></a><br />
<hr />
虽然数据库正常打开了,不过很不幸,后台还是有一些坏块报错,通过dbv检查发现有文件有一部分坏块,类似dbv报错信息<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/1_1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/1_1.png" alt="1_1" width="690" height="536" class="alignleft size-full wp-image-11925" /></a><br />
<hr />
通过分析该文件在磁盘组中各个磁盘的分布情况<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2026/01/map.png"><img src="https://www.xifenfei.com/wp-content/uploads/2026/01/map.png" alt="map" width="822" height="467" class="alignleft size-full wp-image-11926" /></a><br />
<hr />
确认该文件确实有部分block分布在被dd磁盘的破坏的范围内这个部分的数据丢失无法挽回,只能是定位到具体对象然后由业务想办法处理.相对以往的各种dd破坏的案例恢复而言,这个应该是效果比较好的一个,而且也是恢复比较容易的一个,没有使用到asm disk 基于asm au/oracle block 扫描的级别,而且system表空间没有任何损坏,数据库甚至直接open成功了,以往的一些dd案例列举:<br />
<a href="https://www.xifenfei.com/2020/06/asm-dd-recovery.html" title="asm磁盘dd破坏恢复">asm磁盘dd破坏恢复</a><br />
<a href="https://www.xifenfei.com/2024/12/dd-asm-disk-header-recovery.html" title="dd破坏asm磁盘头恢复" rel="noopener" target="_blank">dd破坏asm磁盘头恢复</a><br />
<a href="https://www.xifenfei.com/2022/03/asm-disk-zero-recovery.html" title="asm disk 磁盘部分被清空恢复" rel="noopener" target="_blank">asm disk 磁盘部分被清空恢复</a></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/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/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/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><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/aix-nfs-combehin.html" rel="bookmark" class="crp_title">aix环境写入大文件设置combehin提高效率</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/08/obet-forcecopy-ioerror.html" rel="bookmark" class="crp_title">obet forcecopy功能抢救硬件故障中的数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/10/bres-dmp-recovery.html" rel="bookmark" class="crp_title">.bres勒索病毒加密数据库dmp文件可恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/04/imp-00098-internal-error-impgst2-ora-24801.html" rel="bookmark" class="crp_title">exp dmp导入报IMP-00098: INTERNAL ERROR: impgst2故障处理</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2026/01/dd-asm-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>expdp dmp 导出不完整导入ORA-39059 ORA-39246 故障抢救数据</title>
		<link>https://www.xifenfei.com/2025/12/ora-39059-ora-39246.html</link>
		<comments>https://www.xifenfei.com/2025/12/ora-39059-ora-39246.html#comments</comments>
		<pubDate>Wed, 03 Dec 2025 13:22:07 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[dmp损坏]]></category>
		<category><![CDATA[expdp 恢复]]></category>
		<category><![CDATA[ORA-39059]]></category>
		<category><![CDATA[ORA-39246]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11796</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/12/ora-39059-ora-39246.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/2025/12/ora-39059-ora-39246.html" target="_blank">expdp dmp 导出不完整导入ORA-39059 ORA-39246 故障抢救数据</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>客户一套nc系统,由于安装时候把库建在了比较小的分区上,运行一些时间之后,出现空间不足,现场技术人员对oracle不太熟悉,经过一系列操作(删除业务表空间,复制pdb,创建表空间等等操作),无法恢复数据库,准备使用备份的dmp进行还原,结果分析发现仅保留的最后一份dmp,是一份导出不完全的dmp文件,无法正常导入(以前处理过一个类似case:<a href="https://www.xifenfei.com/2025/03/ora-39773.html" title="ORA-39773: parse of metadata stream failed故障处理" rel="noopener" target="_blank">ORA-39773: parse of metadata stream failed故障处理</a>,尝试导入报ORA-39246错:</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;impdp system/oracle@127.0.0.1/orapdb directory=expdp_dir dumpfile=xxxxx_2025-12-01_0230.dmp logfile=1.log

Import: Release 19.0.0.0.0 - Production on 星期三 12月 3 21:00:19 2025
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

连接到: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39002: 操作无效
ORA-39059: 转储文件集不完整
ORA-39246: 无法在提供的转储文件中定位主表
</pre>
<p>分析当时当初的dmp日志,由于expdp的job表所在表空间不足导致expdp导出失败<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/dmp1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/dmp1.png" alt="dmp1" width="1040" height="439" class="alignleft size-full wp-image-11797" /></a><br />
<hr />
<pre class="brush: bash; title: ; notranslate">
TABLE:&quot;XIFENFEI&quot;.&quot;EOM_MEASURE_POINT&quot;
ORA-30032: 挂起的 (可恢复) 语句已超时
ORA-01691: Lob 段 XIFENFEI.SYS_LOB0000161267C00111$$ 无法通过 32 (在表空间 NNC_DATA01 中) 扩展
ORA-06512: 在 &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: 在 &quot;SYS.KUPW$WORKER&quot;, line 12620
ORA-06512: 在 &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: 在 &quot;SYS.KUPW$WORKER&quot;, line 11414
----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xda5dae50     33476  package body SYS.KUPW$WORKER.WRITE_ERROR_INFORMATION
0xda5dae50     12641  package body SYS.KUPW$WORKER.DETERMINE_FATAL_ERROR
0xda5dae50     11602  package body SYS.KUPW$WORKER.CREATE_OBJECT_ROWS
0xda5dae50     15268  package body SYS.KUPW$WORKER.FETCH_XML_OBJECTS
0xda5dae50      3907  package body SYS.KUPW$WORKER.UNLOAD_METADATA
0xda5dae50     13736  package body SYS.KUPW$WORKER.DISPATCH_WORK_ITEMS
0xda5dae50      2429  package body SYS.KUPW$WORKER.MAIN
0x6524a4f0         2  anonymous block
KUPW: Object row index into parse items is: 1
KUPW: Parse item count is: 19
KUPW: In function CHECK_FOR_REMAP_NETWORK
KUPW: Nothing to remap
KUPW: In procedure BUILD_OBJECT_STRINGS - non-base info
KUPW: In procedure BUILD_SUBNAME_LIST with TABLE:XIFENFEI.EOM_MEASURE_POINT
KUPW: In function NEXT_PO_NUMBER
KUPW: PO number assigned: 34198
FORALL
KUPW: In procedure DETERMINE_FATAL_ERROR with ORA-30032: 挂起的 (可恢复) 语句已超时
ORA-01691: Lob 段 XIFENFEI.SYS_LOB0000161267C00111$$ 无法通过 32 (在表空间 NNC_DATA01 中) 扩展
作业 &quot;XIFENFEI&quot;.&quot;SYS_EXPORT_SCHEMA_01&quot; 因致命错误于 星期一 12月 1 06:33:21 2025 elapsed 0 04:03:18 停止
</pre>
<p>从导出日志看,在导出大量&#8221;0 KB       0 行&#8221;记录之后提示表空间不足,expdp的job表无法扩展导致导出挂起然后超时导出终止(这个导出操作没有完全完成),从而在导入的时候出现了ORA-39059: 转储文件集不完整  ORA-39246: 无法在提供的转储文件中定位主表 的错误.对于这种故障,分析导出日志,发现运气不错,所有有数据的表都导出完成,基于这个心中就有了第一层底气,所有表数据不会丢失(因为都导出到了这个dmp中),但是非表的字典数据不完整,要想业务完整跑起来,需要找到一个完整的业务字典信息.对于大量的备份dmp被删除,然后对应分区还写入了很多数据,只能尝试看运气,通过对磁盘文件镜像,然后进行反删除恢复,找出来一个11月26日的dmp的压缩文件是完整的<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/good-dmp.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/good-dmp.png" alt="good-dmp" width="645" height="316" class="alignleft size-full wp-image-11798" /></a><br />
<hr />
通过这个dmp导入业务字典信息,然后再利用expdp dmp解析工具(<a href="https://www.xifenfei.com/2020/03/expdp-dmp-recovery.html" title="expdp dmp被加密破坏恢复" rel="noopener" target="_blank">expdp dmp被加密破坏恢复</a>)把所有表数据出来,经过这两者组合,顺利完成数恢复,可以测试业务完全正常</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/ora-39126-%e5%9c%a8-kupwworker-put_ddls-table_statistics-%e4%b8%ad-worker-%e5%8f%91%e7%94%9f%e6%84%8f%e5%a4%96%e8%87%b4%e5%91%bd%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">ORA-39126: 在 KUPW$WORKER.PUT_DDLS [TABLE_STATISTICS] 中 Worker 发生意外致命错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/system-tablespace-lost-partial-file.html" rel="bookmark" class="crp_title">system表空间丢失部分文件恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/%e5%9c%a8rac%e4%b8%adexpdp-%e4%bf%ae%e6%94%b9service_name.html" rel="bookmark" class="crp_title">在RAC中expdp 修改Service_Name</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/the-value-30-of-maxtrans-parameter-ignored.html" rel="bookmark" class="crp_title">The value (30) of MAXTRANS parameter ignored</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/obj%e5%9d%8f%e5%9d%97expexpdp%e5%af%bc%e5%87%ba%e4%b8%8d%e8%83%bd%e5%b7%a5%e4%bd%9c.html" rel="bookmark" class="crp_title">obj$坏块exp/expdp导出不能正常执行</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/ora-39773.html" rel="bookmark" class="crp_title">ORA-39773: parse of metadata stream failed故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/09/devos-db-recovery.html" rel="bookmark" class="crp_title">.Devos加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/08/delete-wri_adv_sqlt_rtn_plan-error.html" rel="bookmark" class="crp_title">DELETE FROM wri$_adv_sqlt_rtn_planWHERE task_id = :tid AND exec_name = :execution_name</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/expdp-xml-ora-22924.html" rel="bookmark" class="crp_title">expdp导出xml列报ORA-22924故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/06/datapump-pls-00753.html" rel="bookmark" class="crp_title">数据泵迁移Wrapped PLSQL之后报PLS-00753</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/11/con-ora-600-kdsgrp1.html" rel="bookmark" class="crp_title">解决CON$ ORA-600 kdsgrp1错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/%e9%87%8d%e5%bb%badbms_stats%e5%8c%85.html" rel="bookmark" class="crp_title">重建DBMS_STATS包</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/12/ora-39059-ora-39246.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system表空间丢失部分文件恢复</title>
		<link>https://www.xifenfei.com/2025/10/system-tablespace-lost-partial-file.html</link>
		<comments>https://www.xifenfei.com/2025/10/system-tablespace-lost-partial-file.html#comments</comments>
		<pubDate>Wed, 08 Oct 2025 13:51:27 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[bbed 修复system]]></category>
		<category><![CDATA[kdBlkCheckError]]></category>
		<category><![CDATA[ORA-01147，system丢失恢复，system异常恢复]]></category>
		<category><![CDATA[ORA-600 kdBlkCheckError]]></category>
		<category><![CDATA[system丢失部分恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11695</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/10/system-tablespace-lost-partial-file.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/2025/10/system-tablespace-lost-partial-file.html" target="_blank">system表空间丢失部分文件恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户因为system表空间有一个数据文件放在其他位置,当时没有正常拷贝出来(备份了oradata路径下面文件,遗漏了一个system文件),尝试启动库报ORA-01157  ORA-01147等错误</p>
<pre class="brush: sql; title: ; notranslate">
[oracle@xifenfei check_db]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 5 21:13:28 2025

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; recover datafile 1;
Media recovery complete. 
SQL&gt; recover datafile 2,3,4,5,6,7,8,9,10;   
Media recovery complete.
SQL&gt; alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 11 - see DBWR trace file
ORA-01110: data file 11:
'/u01/app/oracle/product/11.2.0.4/db_1/dbs/path_to_datafile.dbf'

SQL&gt; alter database datafile 11 offline drop;

Database altered.

SQL&gt; alter database open;
alter database open
*
ERROR at line 1:
ORA-01147: SYSTEM tablespace file 11 is offline
ORA-01110: data file 11:
'/u01/app/oracle/product/11.2.0.4/db_1/dbs/path_to_datafile.dbf'
</pre>
<p>alert日志报错信息</p>
<pre class="brush: bash; title: ; notranslate">
Sun Oct 05 22:35:01 2025
alter database open
Sun Oct 05 22:35:01 2025
Errors in file /data/app/oracle/diag/rdbms/mtxdb1/mtxdb1/trace/mtxdb1_dbw0_5946.trc:
ORA-01157: cannot identify/lock data file 11 - see DBWR trace file
ORA-01110: data file 11: '/u01/app/oracle/product/11.2.0.4/db_1/dbs/path_to_datafile.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /data/app/oracle/diag/rdbms/mtxdb1/mtxdb1/trace/mtxdb1_ora_11264.trc:
ORA-01157: cannot identify/lock data file 11 - see DBWR trace file
ORA-01110: data file 11: '/u01/app/oracle/product/11.2.0.4/db_1/dbs/path_to_datafile.dbf'
ORA-1157 signalled during: alter database open...
Sun Oct 05 22:35:25 2025
alter database datafile 11 offline 
ORA-1145 signalled during: alter database datafile 11 offline ...
alter database datafile 11 offline drop
Completed: alter database datafile 11 offline drop
alter database open
Errors in file /data/app/oracle/diag/rdbms/mtxdb1/mtxdb1/trace/mtxdb1_ora_11264.trc:
ORA-01147: SYSTEM tablespace file 11 is offline
ORA-01110: data file 11: '/u01/app/oracle/product/11.2.0.4/db_1/dbs/path_to_datafile.dbf'
ORA-1147 signalled during: alter database open...
</pre>
<p>由于11号文件是system表空间的一个数据文件,对于这种数据文件丢失无法offline该数据文件,然后open库(也就是说在open库的时候,system表空间的数据文件必须全部online,如果有部分文件offline就会报ORA-01147).对于这样的情况,以前有过类似恢复经历:<a href="https://www.xifenfei.com/2012/11/bbed%e6%89%93%e5%bc%80%e4%b8%a2%e5%a4%b1%e9%83%a8%e5%88%86system%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e5%ba%93.html" title="bbed打开丢失部分system数据文件库" rel="noopener" target="_blank">bbed打开丢失部分system数据文件库</a>,这次的编写了一个m_scn程序实现快速处理</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xifenfei  tmp]$ cat 1.txt
1@/data/app/oracle/oradata/mtxdb1/system01.dbf
11@/tmp/11.dbf
[oracle@xifenfei  tmp]$ ./m_scn 1.txt

-------------Is processing datafile:/tmp/11.dbf-------------
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000835728 s, 1.3 GB/s

[oracle@xifenfei tmp]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 8 11:27:32 2025

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; set numw 16
SQL&gt; col CHECKPOINT_TIME for a40
SQL&gt; set lines 150
SQL&gt; set pages 1000
SQL&gt; SELECT status,
  2  to_char(checkpoint_time,'yyyy-mm-dd hh24:mi:ss') checkpoint_time,FUZZY,checkpoint_change#,
  3  count(*) ROW_NUM
  4  FROM v$datafile_header
  5  GROUP BY status, checkpoint_change#, to_char(checkpoint_time,'yyyy-mm-dd hh24:mi:ss'),fuzzy
  6  ORDER BY status, checkpoint_change#, checkpoint_time;

STATUS  CHECKPOINT_TIME                          FUZ CHECKPOINT_CHANGE#          ROW_NUM
------- ---------------------------------------- --- ------------------ ----------------
OFFLINE 2025-10-02 06:50:06                      NO      17328662858685                1
ONLINE  2025-10-02 06:50:06                      NO      17328662858685               10


SQL&gt; alter database datafile 11 online;

Database altered.
</pre>
<p>然后重建ctl,并尝试打开库<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/10/ctl_re.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/10/ctl_re.png" alt="ctl_re" width="900" height="677" class="alignleft size-full wp-image-11696" /></a><br />
<hr />
然后查询11号文件中涉及的对象情况</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; select distinct owner,segment_name,segment_type from dba_extents where file_id=11;

OWNER                          SEGMENT_NAME                           SEGMENT_TYPE
------------------------------ -------------------------------------- ------------------
SYS                            SYSTEM                                 ROLLBACK
SYS                            I_COL1                                 INDEX
SYS                            AUD$                                   TABLE

SQL&gt; select owner,segment_name from dba_segments where HEADER_FILE=11;

no rows selected
</pre>
<p>证明丢失的11号文件（system表空间文件）,涉及的对象较少,而且不涉及核心字典,比如tab$,obj$,col$等非常核心对象,评估理论上应该不涉业务数据丢失,尝试直接expdp导出数据,但是很不幸,报ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018]错误</p>
<pre class="brush: bash; title: ; notranslate">
. . exported &quot;XFF020&quot;.&quot;OTHERBILLDETAIL_DEL&quot;              6.405 MB  126048 rows
. . exported &quot;XFF020&quot;.&quot;POSSOLDOUT&quot;                       7.784 MB  281413 rows
ORA-31693: Table data object &quot;XFF020&quot;.&quot;MATERIELTRAN&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=159:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_DATA [TABLE_DATA:&quot;XFF020&quot;.&quot;MATERIELTRAN&quot;] 
UPDATE &quot;SYS&quot;.&quot;SYS_EXPORT_FULL_01&quot; SET processing_state = :1, processing_status = :2
    WHERE process_order = :3 AND duplicate = 0
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 7866
ORA-31693: Table data object &quot;XFF020&quot;.&quot;MATERIELTRAN&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=159:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1

ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 9721

----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xef2fc508     21979  package body SYS.KUPW$WORKER
0xef2fc508      9742  package body SYS.KUPW$WORKER
0xef2fc508      3437  package body SYS.KUPW$WORKER
0xef2fc508     10436  package body SYS.KUPW$WORKER
0xef2fc508      1824  package body SYS.KUPW$WORKER
0xef2feb20         2  anonymous block

ORA-39097: Data Pump job encountered unexpected error -607
ORA-39065: unexpected master process exception in DISPATCH
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []

ORA-31693: Table data object &quot;XFF020&quot;.&quot;ANALYSEREPORT&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=161:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_DATA [TABLE_DATA:&quot;XFF020&quot;.&quot;ANALYSEREPORT&quot;] 
UPDATE &quot;SYS&quot;.&quot;SYS_EXPORT_FULL_01&quot; SET processing_state = :1, processing_status = :2
   WHERE process_order = :3 AND duplicate = 0
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 7866
ORA-31693: Table data object &quot;XFF020&quot;.&quot;ANALYSEREPORT&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=161:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1

ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 9721

----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xef2fc508     21979  package body SYS.KUPW$WORKER
0xef2fc508      9742  package body SYS.KUPW$WORKER
0xef2fc508      3437  package body SYS.KUPW$WORKER
0xef2fc508     10436  package body SYS.KUPW$WORKER
0xef2fc508      1824  package body SYS.KUPW$WORKER
0xef2feb20         2  anonymous block

ORA-31693: Table data object &quot;XFF020CW&quot;.&quot;MATERIELTRAN&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=160:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_DATA [TABLE_DATA:&quot;XFF020CW&quot;.&quot;MATERIELTRAN&quot;] 
UPDATE &quot;SYS&quot;.&quot;SYS_EXPORT_FULL_01&quot; SET processing_state = :1, processing_status = :2
   WHERE process_order = :3 AND duplicate = 0
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 7866
ORA-31693: Table data object &quot;XFF020CW&quot;.&quot;MATERIELTRAN&quot; failed to load/unload and is being skipped due to error:
ORA-39068: invalid master table data in row with PROCESS_ORDER=160:1000001
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [11], [3], [18018], [], [], [], [], [], [], [], []
ORA-06512: at &quot;SYS.KUPF$FILE&quot;, line 3720
ORA-06512: at line 1

ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: at &quot;SYS.KUPW$WORKER&quot;, line 9721

----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xef2fc508     21979  package body SYS.KUPW$WORKER
0xef2fc508      9742  package body SYS.KUPW$WORKER
0xef2fc508      3437  package body SYS.KUPW$WORKER
0xef2fc508     10436  package body SYS.KUPW$WORKER
0xef2fc508      1824  package body SYS.KUPW$WORKER
0xef2feb20         2  anonymous block

Job &quot;SYS&quot;.&quot;SYS_EXPORT_FULL_01&quot; stopped due to fatal error at Wed Oct 8 11:59:29 2025 elapsed 0 00:18:48
</pre>
<p>对ORA-600 kdBlkCheckError进行分析分析（11表示文件号,3表示block）,是由于导出生成的master表写入在system表空间,而system表空间中的file# 11是人工构造出来的,block 3 是位图分配信息（该信息和实际字典中存储信息不匹配）,所以导致出现该错误,对于这个问题解决方法为expdp写master表不在system表空间即可,通过该操作,顺利导出数据,完成本次恢复任务<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/10/expdp_ok.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/10/expdp_ok.png" alt="expdp_ok" width="1850" height="483" class="alignleft size-full wp-image-11697" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/ora-39126-%e5%9c%a8-kupwworker-put_ddls-table_statistics-%e4%b8%ad-worker-%e5%8f%91%e7%94%9f%e6%84%8f%e5%a4%96%e8%87%b4%e5%91%bd%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">ORA-39126: 在 KUPW$WORKER.PUT_DDLS [TABLE_STATISTICS] 中 Worker 发生意外致命错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ora-39059-ora-39246.html" rel="bookmark" class="crp_title">expdp dmp 导出不完整导入ORA-39059 ORA-39246 故障抢救数据</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/obj%e5%9d%8f%e5%9d%97expexpdp%e5%af%bc%e5%87%ba%e4%b8%8d%e8%83%bd%e5%b7%a5%e4%bd%9c.html" rel="bookmark" class="crp_title">obj$坏块exp/expdp导出不能正常执行</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/ora-00600ktspnextl14.html" rel="bookmark" class="crp_title">ORA-00600[ktspNextL1:4]</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/%e8%b7%b3%e8%bf%87obj%e5%9d%8f%e5%9d%97%e6%96%b9%e6%b3%95.html" rel="bookmark" class="crp_title">跳过obj$坏块方法</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/11/con-ora-600-kdsgrp1.html" rel="bookmark" class="crp_title">解决CON$ ORA-600 kdsgrp1错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e4%bd%bf%e7%94%a8dbms_metadata-get_ddl%e5%87%ba%e7%8e%b0ora-31605%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">使用dbms_metadata.get_ddl出现ORA-31605错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2017/08/ora-12012-sys-oraat_os_opt_sy.html" rel="bookmark" class="crp_title">ORA-12012: error on auto execute of job &#8220;SYS&#8221;.&#8221;ORA$AT_OS_OPT_SY_383&#8243;</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/expdp%e9%81%ad%e9%81%87ora-39006ora-39213%e6%95%85%e9%9a%9c%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">expdp遭遇ORA-39006/ORA-39213故障解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/expdp-xml-ora-22924.html" rel="bookmark" class="crp_title">expdp导出xml列报ORA-22924故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/expdp%e4%b8%adparallel%e5%92%8cdumpfile%e5%85%b3%e7%b3%bb.html" rel="bookmark" class="crp_title">expdp中PARALLEL和DUMPFILE关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/upgrade-db-sys-dbms_sqltune.html" rel="bookmark" class="crp_title">数据库升级遭遇ORA-04063: package body &#8220;SYS.DBMS_SQLTUNE&#8221;</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/10/system-tablespace-lost-partial-file.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
