<?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; bbed 修复system</title>
	<atom:link href="https://www.xifenfei.com/tag/bbed-%e4%bf%ae%e5%a4%8dsystem/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Sun, 22 Nov 2026 15:21:14 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>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>
		<item>
		<title>校验代码为 6054  坏块故障修复</title>
		<link>https://www.xifenfei.com/2021/12/than-block-scn-recovery.html</link>
		<comments>https://www.xifenfei.com/2021/12/than-block-scn-recovery.html#comments</comments>
		<pubDate>Sat, 04 Dec 2021 14:51:37 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[bbed 修复system]]></category>
		<category><![CDATA[bbed修复坏块]]></category>
		<category><![CDATA[csc higher than block scn]]></category>
		<category><![CDATA[has higher commit scn]]></category>
		<category><![CDATA[Oracle Recovery Tools]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=9488</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2021/12/than-block-scn-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/2021/12/than-block-scn-recovery.html" target="_blank">校验代码为 6054  坏块故障修复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户反馈数据库操作报错,希望我们给予处理,报错信息如下:<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2021/12/20211204223138.png"><img src="https://www.xifenfei.com/wp-content/uploads/2021/12/20211204223138.png" alt="20211204223138" width="664" height="212" class="alignnone size-full wp-image-9489" /></a><br />
<hr />
通过对system01.dbf数据文件分析</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;dbv file=H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF

DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 20:45:23 2021

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF

DBV-00200: 块 DBA 4330012 已标记为损坏
csc(0x0000.1686df22) higher than block scn(0x0000.00000000)
页 135708 失败, 校验代码为 6054


DBVERIFY - 验证完成

检查的页总数: 184320
处理的页总数 (数据): 93105
失败的页总数 (数据): 0
处理的页总数 (索引): 31365
失败的页总数 (索引): 1
处理的页总数 (其他): 43622
处理的总页数 (段)  : 1
失败的总页数 (段)  : 0
空的页总数: 16228
标记为损坏的总页数: 1
流入的页总数: 0
加密的总页数        : 0
最高块 SCN            : 378591519 (0.378591519)
</pre>
<p>确认block 135708 有问题,确认起对象为I_OBJ5</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, A.PARTITION_NAME
  2    FROM DBA_EXTENTS A
  3   WHERE FILE_ID = &amp;FILE_ID
  4     AND &amp;BLOCK_ID BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1;
输入 file_id 的值:  1
原值    3:  WHERE FILE_ID = &amp;FILE_ID
新值    3:  WHERE FILE_ID = 1
输入 block_id 的值:  135708
原值    4:    AND &amp;BLOCK_ID BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1
新值    4:    AND 135708 BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1

OWNER                          SEGMENT_NAME    SEGMENT_TYPE       TABLESPACE_NAME                PARTITION_NAME
------------------------------ --------------- ------------------ ------------------------------ -----------------
SYS                            I_OBJ5          INDEX
                    SYSTEM
</pre>
<p>这个对象为核心对象obj$的index,无法直接rebuild,当然可以通过参考以前blog文档进行重建:<a href="https://www.xifenfei.com/2014/10/%e8%a7%a3%e5%86%b3ora-00701-object-necessary-for-warmstarting-database-cannot-be-altered%e9%94%99%e8%af%af.html" title="bootstrap$核心index(I_OBJ1,I_USER1,I_FILE#_BLOCK#,I_IND1,I_TS#,I_CDEF1等)异常恢复—ORA-00701错误解决" rel="noopener" target="_blank">bootstrap$核心index(I_OBJ1,I_USER1,I_FILE#_BLOCK#,I_IND1,I_TS#,I_CDEF1等)异常恢复—ORA-00701错误解决</a>,直接对该坏块进行修复.</p>
<pre class="brush: bash; title: ; notranslate">
BBED&gt; p kcbh
struct kcbh, 20 bytes                       @0
   ub1 type_kcbh                            @0        0x06
   ub1 frmt_kcbh                            @1        0xa2
   ub1 spare1_kcbh                          @2        0x00
   ub1 spare2_kcbh                          @3        0x00
   ub4 rdba_kcbh                            @4        0x0042121c
   ub4 bas_kcbh                             @8        0x00000000
   ub2 wrp_kcbh                             @12       0x0000
   ub1 seq_kcbh                             @14       0xff
   ub1 flg_kcbh                             @15       0x04 (KCBHFCKV)
   ub2 chkval_kcbh                          @16       0xe8c4
   ub2 spare3_kcbh                          @18       0x0000

BBED&gt; m /x 23df8616
 File: H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF (0)
 Block: 135709           Offsets:    8 to  519           Dba:0x00000000
------------------------------------------------------------------------
 23df8616 00000104 44fe0000 02000000 28000000 22df8616 00000000 02000200
 00000000 0a001800 f7dc1b00 8002c000 bdd80100 00e00000 f331b114 0a001f00
 14081e00 4505c000 2c103b00 01200000 2adf8616 00008009 01000000 3f00a200
 35074010 00000000 e1b24100 56694100 06000000 641f0000 57119211 cd11d208
 97080812 43127e12 b912f412 2f130d09 e013bd09 1b14cc14 0715ab07 5c087d15
 b715f215 a3167007 3507de16 19175417 21088f17 ca170518 4018330a 1f0b7b18
 2c196719 a219dd19 181a531a 8e1a4709 031be607 f809791b b41bef1b 2a1c651c
 db1ce20d 8c1d310d c71d021e 3d1e781e b31e8209 291f291f 291f291f 291f291f
 291f291f 291f0000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;

</pre>
<p>然后dbv报以下错误</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;dbv file=H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF

DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 22:06:49 2021

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF
itl[2] has higher commit scn(0x0000.1686df2a) than block scn (0x0000.1686df23)
页 135708 失败, 校验代码为 6056


DBVERIFY - 验证完成

检查的页总数: 184320
处理的页总数 (数据): 95152
失败的页总数 (数据): 0
处理的页总数 (索引): 34569
失败的页总数 (索引): 1
处理的页总数 (其他): 38386
处理的总页数 (段)  : 1
失败的总页数 (段)  : 0
空的页总数: 16213
标记为损坏的总页数: 0
流入的页总数: 0
加密的总页数        : 0
最高块 SCN            : 378683101 (0.378683101)
</pre>
<p>再次对其进行修复</p>
<pre class="brush: bash; title: ; notranslate">
BBED&gt; m /x 22df8616
 File: H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF (0)
 Block: 135709           Offsets:   88 to  599           Dba:0x00000000
------------------------------------------------------------------------
 22df8616 00008009 01000000 3f00a200 35074010 00000000 e1b24100 56694100
 06000000 641f0000 57119211 cd11d208 97080812 43127e12 b912f412 2f130d09
 e013bd09 1b14cc14 0715ab07 5c087d15 b715f215 a3167007 3507de16 19175417
 21088f17 ca170518 4018330a 1f0b7b18 2c196719 a219dd19 181a531a 8e1a4709
 031be607 f809791b b41bef1b 2a1c651c db1ce20d 8c1d310d c71d021e 3d1e781e
 b31e8209 291f291f 291f291f 291f291f 291f291f 291f0000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

 &lt;32 bytes per line&gt;
</pre>
<p>再次dbv检查修复成功</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XFF&gt;dbv file=H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF

DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 22:30:14 2021

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF


DBVERIFY - 验证完成

检查的页总数: 184320
处理的页总数 (数据): 95152
失败的页总数 (数据): 0
处理的页总数 (索引): 34569
失败的页总数 (索引): 0
处理的页总数 (其他): 38386
处理的总页数 (段)  : 1
失败的总页数 (段)  : 0
空的页总数: 16213
标记为损坏的总页数: 0
流入的页总数: 0
加密的总页数        : 0
最高块 SCN            : 378683101 (0.378683101)
</pre>
<p>对于这类的坏块,也可以通过我们的Oracle recovery tools进行快速恢复<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2021/12/20211204225050.png"><img src="https://www.xifenfei.com/wp-content/uploads/2021/12/20211204225050.png" alt="20211204225050" width="802" height="374" class="alignnone size-full wp-image-9490" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/dd%e6%93%8d%e4%bd%9c%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">dd操作数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ora-600-kcbzib_kcrsds_1-202501.html" rel="bookmark" class="crp_title">2025年首个故障恢复&#8212;ORA-600 kcbzib_kcrsds_1</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/%e5%9c%a8ultraedit%e4%b8%ad%e5%ae%9a%e4%bd%8d%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e5%86%85%e5%ae%b9.html" rel="bookmark" class="crp_title">在UltraEdit中定位数据文件内容</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/03/bbed-recovery-corrupted-block.html" rel="bookmark" class="crp_title">file 1 block 128 corrupted/坏块恢复&#8212;system rollback坏块修复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/05/%e7%b3%bb%e7%bb%9f%e4%b8%ad%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97%e5%92%8coracle-%e4%b8%ad%e7%ac%ac%e4%b8%80%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%9d%97.html" rel="bookmark" class="crp_title">系统中数据文件第一个数据块和oracle 中第一个数据块关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/06/%e8%ae%b0%e5%bd%95%e5%9b%a0%e7%a3%81%e7%9b%98%e5%a4%b4%e5%bc%82%e5%b8%b8%e6%8a%a2%e6%95%91redo%e6%81%a2%e5%a4%8d%e7%bb%8f%e5%8e%86.html" rel="bookmark" class="crp_title">记录因磁盘头被重写,抢救redo恢复经历</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/09/bbed%e7%ae%80%e5%8d%95%e6%9b%bf%e6%8d%a2block%e6%b5%8b%e8%af%95.html" rel="bookmark" class="crp_title">bbed简单替换block测试</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/05/bbed%e5%a4%84%e7%90%86ora-01200%e6%95%85%e9%9a%9c.html" rel="bookmark" class="crp_title">bbed处理ORA-01200故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/04/%e8%a1%a8%e7%a9%ba%e9%97%b4online%e5%87%ba%e7%8e%b0ora-00600kcbz_check_objd_typ%e5%a4%84%e7%90%86%e8%bf%87%e7%a8%8b.html" rel="bookmark" class="crp_title">表空间online出现ORA-00600[kcbz_check_objd_typ]处理过程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/07/oradebug-poke-ora-32521-ora-32519.html" rel="bookmark" class="crp_title">oradebug poke ORA-32521/ORA-32519故障解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/08/%e4%bd%bf%e7%94%a8oradebug%e4%bf%ae%e6%94%b9%e6%95%b0%e6%8d%ae%e5%ba%93scn.html" rel="bookmark" class="crp_title">使用oradebug修改数据库scn</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/%e6%89%be%e5%87%badbv%e7%9b%b8%e5%85%b3dba%e5%80%bc%e5%9c%a8%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e4%b8%ad%e5%af%b9%e5%ba%94%e4%bd%8d%e7%bd%ae.html" rel="bookmark" class="crp_title">找出dbv相关dba值在数据文件中对应位置</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2021/12/than-block-scn-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
