<?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; ORA-01248</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-01248/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>记录一次oracle现场故障处理经过</title>
		<link>https://www.xifenfei.com/2021/04/oracle-on-site-recovery.html</link>
		<comments>https://www.xifenfei.com/2021/04/oracle-on-site-recovery.html#comments</comments>
		<pubDate>Sat, 03 Apr 2021 13:54:53 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[非常规恢复]]></category>
		<category><![CDATA[Input/output error]]></category>
		<category><![CDATA[ORA-01189]]></category>
		<category><![CDATA[ORA-01248]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=9160</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2021/04/oracle-on-site-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/04/oracle-on-site-recovery.html" target="_blank">记录一次oracle现场故障处理经过</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>近期到现场进行了一个数据库恢复,我在恢复之前该库先由于硬件进行恢复,然后由其他人对其进行了一系列数据库恢复,但是未恢复成功,客户希望我们到现场进行处理(因为网络原因无法远程).接手库之后,处理第一个问题,是客户在进行现场备份的时候(把linux数据拷贝到win的过程中)发现有几个文件拷贝异常,这个错误很可能是由于当初的硬件故障修复之后留下的后遗症(由于io设备错误,无法运行此项请求),通过工具进行拷贝,恢复出来<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2021/04/20210403210131.png"><img src="https://www.xifenfei.com/wp-content/uploads/2021/04/20210403210131.png" alt="20210403210131" width="532" height="474" class="alignnone size-full wp-image-9161" /></a><br />
<hr />
<pre class="brush: bash; title: ; notranslate">
DUL&gt; copy file from  /oradata2/xifenfeidata.dbf to /oradata2/xifenfeidata.dbf

starting copy datafile '/oradata1/xifenfeidata.dbf' to '/oradata2/xifenfeidata.dbf'
read data error from file '/oradata1/xifenfeidata.dbf'.error message:Input/output error
read block# error: 560171
read data error from file '/oradata1/xifenfeidata.dbf'.error message:Input/output error
read block# error: 560179
datafile copy completed with 2 block error.
</pre>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost ~]$ dbv file=/oradata2/xifenfeidata.dbf blocksize=16384

DBVERIFY: Release 11.2.0.3.0 - Production on Mon Mar 29 17:28:17 2021

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /oradata2/xifenfeidata.dbf
Page 560171 is marked corrupt
Corrupt block relative dba: 0x3bc88c2b (file 239, block 560171)
Completely zero block found during dbv: 

Page 560179 is marked corrupt
Corrupt block relative dba: 0x3bc88c33 (file 239, block 560179)
Completely zero block found during dbv: 



DBVERIFY - Verification complete

Total Pages Examined         : 4194302
Total Pages Processed (Data) : 2230726
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 1936953
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 26618
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 3
Total Pages Marked Corrupt   : 2
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 304929867 (106.304929867)
</pre>
<p>修复完相关无法拷贝文件之后,启动数据库报控制文件异常</p>
<pre class="brush: bash; title: ; notranslate">
Mon Mar 29 15:03:38 2021
alter database mount
USER (ospid: 29044): terminating the instance
Mon Mar 29 15:03:42 2021
System state dump requested by (instance=1, osid=29044), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/xff/xff/trace/xff_diag_28961.trc
Instance terminated by USER, pid = 29044
</pre>
<p>尝试重建ctl</p>
<pre class="brush: sql; title: ; notranslate">
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 29 17:40:17 2021

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&gt; startup nomount pfile='/tmp/pfile'
ORACLE instance started.

Total System Global Area 1.7704E+10 bytes
Fixed Size                  2235568 bytes
Variable Size            2348811088 bytes
Database Buffers         1.5301E+10 bytes
Redo Buffers               52580352 bytes
SQL&gt; @/tmp/ctl.sql
CREATE CONTROLFILE REUSE DATABASE xff NORESETLOGS  NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01189: file is from a different RESETLOGS than previous files
ORA-01110: data file 249: '/oradata/xff/system03.dbf'
</pre>
<p>初步判断是由于对方之前恢复导致部分文件resetlogs scn异常,通过bbed进行判断确认</p>
<pre class="brush: bash; title: ; notranslate">
BBED&gt; set file 1
        FILE#           1

BBED&gt; p kcvfhrls
struct kcvfhrls, 8 bytes                    @116     
   ub4 kscnbas                              @116      0x00000001
   ub2 kscnwrp                              @120      0x0000

BBED&gt; set file 249
        FILE#           249

BBED&gt; p kcvfhrls
struct kcvfhrls, 8 bytes                    @116     
   ub4 kscnbas                              @116      0x00000001
   ub2 kscnwrp                              @120      0x0000
</pre>
<p>通过bbed修改相关值,然后重建控制文件成功,尝试resetlogs库，报ORA-01248错误</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01248: file 234 was created in the future of incomplete recovery
ORA-01110: data file 234: '/oradata1/xifenfeidata5.DBF'
</pre>
<p>关于ORA-01248的错误解释</p>
<pre class="brush: bash; title: ; notranslate">
01248, 00000, &quot;file %s was created in the future of incomplete recovery&quot;
// *Cause:  Attempting to do a RESETLOGS open with a file entry in the
//          control file that was originally created after the UNTIL time 
//          of the incomplete recovery.
//          Allowing such an entry may hide the version of the file that 
//          is needed at this time.  The file number may be in use for 
//          a different file which would be lost if the RESETLOGS was allowed.
// *Action: If more recovery is desired then apply redo until the creation
//          time of the file is reached. If the file is not wanted and the
//          same file number is not in use at the stop time of the recovery,
//          then the file can be taken offline with the FOR DROP option.
//          Otherwise a different control file is needed to allow the RESETLOGS.
//          Another backup can be restored and recovered, or a control file can
//          be created via CREATE CONTROLFILE.
</pre>
<p>大概的意思是文件的创建时间大于文件当前的scn,通过查询确实如此</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; select file#,CREATION_CHANGE#,CREATION_TIME from v$datafile_header where file#=234;

           FILE# CREATION_CHANGE# CREATION_
---------------- ---------------- ---------
             234     419298664864 02-AUG-19

SQL&gt; SELECT status,  
  2  to_char(checkpoint_change#,'9999999999999999') &quot;SCN&quot;,
  3  to_char(checkpoint_time,'yyyy-mm-dd hh24:mi:ss') checkpoint_time,FUZZY,
  4  count(*) ROW_NUM
  5  FROM v$datafile_header
  6  GROUP BY status, checkpoint_change#, to_char(checkpoint_time,'yyyy-mm-dd hh24:mi:ss'),fuzzy
  7  ORDER BY status, checkpoint_change#, checkpoint_time;

STATUS  SCN               CHECKPOINT_TIME     FUZ          ROW_NUM
------- ----------------- ------------------- --- ----------------
ONLINE       417750848223 2021-02-23 23:50:46 YES                7
ONLINE       417750848223 2021-03-21 11:44:25 NO               396
</pre>
<p>通过对部分scn进行修改（比如减小创建时间的scn)，然后尝试resetlogs库</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 5 with name
&quot;_SYSSMU5_2708889888$&quot; too small
Process ID: 3182
Session ID: 1 Serial number: 3
</pre>
<p>这个错误比较简单,参考以前的部分文章:<a href="https://www.xifenfei.com/2015/07/%e5%9c%a8%e6%95%b0%e6%8d%ae%e5%ba%93open%e8%bf%87%e7%a8%8b%e4%b8%ad%e5%b8%b8%e9%81%87%e5%88%b0ora-01555%e6%b1%87%e6%80%bb.html" title="在数据库open过程中常遇到ORA-01555汇总">在数据库open过程中常遇到ORA-01555汇总</a><a href="https://www.xifenfei.com/2019/05/ora-00704-ora-00604-ora-01555.html" title="数据库open过程遭遇ORA-1555对应sql语句补充" rel="noopener" target="_blank">数据库open过程遭遇ORA-1555对应sql语句补充</a>,处理之后,数据库open成功</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; startup mount;
ORACLE instance started.

Total System Global Area 1.7704E+10 bytes
Fixed Size                  2235568 bytes
Variable Size            2348811088 bytes
Database Buffers         1.5301E+10 bytes
Redo Buffers               52580352 bytes
Database mounted.
SQL&gt; alter database open;

Database altered.
</pre>
<p>本次数据库恢复基本上完成,已经最大限度恢复数据,导出数据到新库,完成恢复任务</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/07/dbv-controlfile.html" rel="bookmark" class="crp_title">需要注意:dbv 检测controlfile可能不准</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/04/raid-force-online-database-recovery.html" rel="bookmark" class="crp_title">raid强制上线后数据库无法启动故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/01/%e9%87%8d%e5%bb%ba%e6%8e%a7%e5%88%b6%e6%96%87%e4%bb%b6%e5%bc%95%e5%8f%91ora-00218%e6%95%85%e9%9a%9c.html" rel="bookmark" class="crp_title">重建控制文件引发ORA-00218故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2018/07/ora-01092-ora-00704-ora-00942.html" rel="bookmark" class="crp_title">ORA-01092 ORA-00704 ORA-00942</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/undo%e5%9d%8f%e5%9d%97%e5%af%bc%e8%87%b4%e6%95%b0%e6%8d%ae%e5%ba%93%e5%bc%82%e5%b8%b8%e7%bb%88%e6%ad%a2%e6%a1%88%e4%be%8b.html" rel="bookmark" class="crp_title">undo坏块导致数据库异常终止案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/06/ora-00756-ora-10567-0-lost-recovery.html" rel="bookmark" class="crp_title">ORA-00756 ORA-10567故障数据0丢失恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2013/02/rman%e5%88%b6%e9%80%a0%e5%9d%8f%e5%9d%97bbed%e4%bf%ae%e5%a4%8d%e5%9d%8f%e5%9d%97.html" rel="bookmark" class="crp_title">rman制造坏块,bbed修复坏块</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/09/dul%e6%8a%bd%e5%8f%96%e5%bc%82%e5%b8%b8asm%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">密码保护：dul抽取异常asm文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/09/%e5%81%87%e5%9d%8f%e5%9d%97%e5%bc%95%e8%b5%b7%e6%81%90%e6%85%8c.html" rel="bookmark" class="crp_title">假坏块引起恐慌</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/06/os-error-oracle-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/2022/04/segment-header-ora-1578.html" rel="bookmark" class="crp_title">segment header异常对象删除处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/05/rm-rf-oracle-recovery.html" rel="bookmark" class="crp_title">rm -rf误删Oracle数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2021/04/oracle-on-site-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Recovery Tools 解决ORA-01190 ORA-01248等故障</title>
		<link>https://www.xifenfei.com/2021/01/oracle-recovery-tools-ora-01190-ora-01248.html</link>
		<comments>https://www.xifenfei.com/2021/01/oracle-recovery-tools-ora-01190-ora-01248.html#comments</comments>
		<pubDate>Wed, 06 Jan 2021 10:43:22 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[小工具]]></category>
		<category><![CDATA[ORA-01190]]></category>
		<category><![CDATA[ORA-01248]]></category>
		<category><![CDATA[Oracle Recovery Tools]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=9011</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2021/01/oracle-recovery-tools-ora-01190-ora-01248.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/01/oracle-recovery-tools-ora-01190-ora-01248.html" target="_blank">Oracle Recovery Tools 解决ORA-01190 ORA-01248等故障</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>今天有一个客户数据库恢复请求,通过<a href="https://www.xifenfei.com/oracle_recovery_check" title="Oracle数据库异常恢复检查脚本(Oracle Database Recovery Check)" rel="noopener" target="_blank">Oracle数据库异常恢复检查脚本(Oracle Database Recovery Check)</a>脚本分析发现resetlog信息异常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2021/01/20210106182747.png"><img src="https://www.xifenfei.com/wp-content/uploads/2021/01/20210106182747.png" alt="20210106182747" width="1729" height="404" class="alignnone size-full wp-image-9012" /></a><br />
<hr />
导致数据库恢复报ORA-01190 ORA-01110错</p>
<pre class="brush: bash; title: ; notranslate">
alter database open
Errors in file c:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_4404.trc:
ORA-01190: 控制文件或数据文件 1 来自最后一个 RESETLOGS 之前
ORA-01110: 数据文件 1: 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF'
ORA-1190 signalled during: alter database open...
</pre>
<p>通过<a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-202008.html" title="Oracle Recovery Tools—202008" rel="noopener" target="_blank">Oracle Recovery Tools</a>工具进行修复resetlog 信息<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2021/01/20210106183450.png"><img src="https://www.xifenfei.com/wp-content/uploads/2021/01/20210106183450.png" alt="20210106183450" width="777" height="466" class="alignnone size-full wp-image-9013" /></a><br />
<hr />
再次尝试open数据库报ORA-1248错</p>
<pre class="brush: bash; title: ; notranslate">
SQL&gt; alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-01248: ?? 44 ????????????
ORA-01110: ???? 44: 'E:\ORADATA\ORCL\XIFENFEI.DBF'

Wed Jan 06 14:44:44 2021
alter database open resetlogs
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
ORA-1248 signalled during: alter database open resetlogs...
</pre>
<p>再次通过Oracle Recovery Tools进行修复SCN,数据库open成功</p>
<pre class="brush: bash; title: ; notranslate">
T:\xff&gt;sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 1月 6 14:47:36 2021

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL&gt; startup mount 
ORACLE 例程已经启动。

Total System Global Area 6.9214E+10 bytes
Fixed Size                  2182712 bytes
Variable Size            3.5165E+10 bytes
Database Buffers         3.3823E+10 bytes
Redo Buffers              224296960 bytes
数据库装载完毕。
SQL&gt;
SQL&gt;
SQL&gt; alter database open;

数据库已更改。

</pre>
<p>软件下载:<a href="https://www.xifenfei.com/wp-content/uploads/recover_check/OraRecovery.zip">OraRecovery下载</a><br />
使用说明:<a href="https://www.xifenfei.com/wp-content/uploads/2020/08/OracleRecoveryTools.pdf">使用说明</a></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/09/ora-01113-ora-01110.html" rel="bookmark" class="crp_title">一键恢复ORA-01113 ORA-01110&#8212;Oracle Recovery Tools</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/03/oracle-recovery-tools-ora-00704-ora-01555.html" rel="bookmark" class="crp_title">Oracle Recovery Tools恢复&#8212;ORA-00704 ORA-01555故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/04/oracle-recovery-tools-poweroff-recovery.html" rel="bookmark" class="crp_title">Oracle Recovery Tools快速恢复断电引起的无法正常启动数据库(ORA-01555,MISSING000等问题）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/07/ora_recovery_tool.html" rel="bookmark" class="crp_title">Oracle恢复小工具&#8212;Oracle Recovery Tools</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-missing000000.html" rel="bookmark" class="crp_title">Oracle Recovery Tools恢复MISSING00000文件故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/12/ora-01113-ora-01110-oracle-recovery-tools.html" rel="bookmark" class="crp_title">ORA-01113 ORA-01110错误不一定都要Oracle Recovery Tools解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/01/oracle-recovery-tools-update.html" rel="bookmark" class="crp_title">Oracle Recovery Tools 12月份更新</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/04/orarecovery-202304.html" rel="bookmark" class="crp_title">Oracle Recovery Tools更新&#8212;202304</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/07/hardware-failure-after-oracle-recovery.html" rel="bookmark" class="crp_title">硬件故障恢复出文件之后数据库故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/12/oracle-recovery-tools-ora-00376-ora-01110.html" rel="bookmark" class="crp_title">Oracle Recovery Tools工具一键解决ORA-00376 ORA-01110故障（文件offline）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/01/ora-600-3600.html" rel="bookmark" class="crp_title">ORA-600 3600恢复&#8212;-resetlogs scn异常</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-202008.html" rel="bookmark" class="crp_title">Oracle Recovery Tools&#8212;202008</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2021/01/oracle-recovery-tools-ora-01190-ora-01248.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过多次resetlogs规避类似ORA-01248: file N was created in the future of incomplete recovery错误</title>
		<link>https://www.xifenfei.com/2014/10/%e9%80%9a%e8%bf%87%e5%a4%9a%e6%ac%a1%e8%a7%84%e9%81%bf%e7%b1%bb%e4%bc%bcora-01248-file-n-was-created-in-the-future-of-incomplete-recovery%e9%94%99%e8%af%af.html</link>
		<comments>https://www.xifenfei.com/2014/10/%e9%80%9a%e8%bf%87%e5%a4%9a%e6%ac%a1%e8%a7%84%e9%81%bf%e7%b1%bb%e4%bc%bcora-01248-file-n-was-created-in-the-future-of-incomplete-recovery%e9%94%99%e8%af%af.html#comments</comments>
		<pubDate>Tue, 14 Oct 2014 11:25:12 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle备份恢复]]></category>
		<category><![CDATA[ORA-01248]]></category>
		<category><![CDATA[oracle异常恢复]]></category>
		<category><![CDATA[ORACLE恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=5539</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2014/10/%e9%80%9a%e8%bf%87%e5%a4%9a%e6%ac%a1%e8%a7%84%e9%81%bf%e7%b1%bb%e4%bc%bcora-01248-file-n-was-created-in-the-future-of-incomplete-recovery%e9%94%99%e8%af%af.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/2014/10/%e9%80%9a%e8%bf%87%e5%a4%9a%e6%ac%a1%e8%a7%84%e9%81%bf%e7%b1%bb%e4%bc%bcora-01248-file-n-was-created-in-the-future-of-incomplete-recovery%e9%94%99%e8%af%af.html" target="_blank">通过多次resetlogs规避类似ORA-01248: file N was created in the future of incomplete recovery错误</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p><strong>数据库现状</strong><br />
控制文件<br />
<img src="//www.xifenfei.com/wp-content/uploads/2014/10/recover_xifenfei0.jpg" alt="recover_xifenfei0" width="1409" height="186" class="alignleft size-full wp-image-5543" /><br />
控制文件中数据文件信息<br />
<img src="//www.xifenfei.com/wp-content/uploads/2014/10/recover_xifenfei1.jpg" alt="recover_xifenfei1" width="1412" height="115" class="alignleft size-full wp-image-5540" /><br />
数据文件头信息<br />
<img src="//www.xifenfei.com/wp-content/uploads/2014/10/recover_xifenfei2.jpg" alt="recover_xifenfei2" width="1411" height="113" class="alignleft size-full wp-image-5541" /><br />
redo信息<br />
<img src="//www.xifenfei.com/wp-content/uploads/2014/10/recover_xifenfei3.jpg" alt="recover_xifenfei3" width="1370" height="85" class="alignleft size-full wp-image-5542" /><br />
根据当前<a href="//www.xifenfei.com/5056.html" title="数据库恢复检查脚本(Oracle Database Recovery Check)" target="_blank">数据库恢复检查脚本(Oracle Database Recovery Check)</a>收集的信息,数据库的是非归档状态,而且redo已经覆盖,数据库datafile 5 无法直接online.遇到这样情况,可以使用bbed修改文件头scn实现online(<a href="//www.xifenfei.com/3332.html" title="使用bbed让rac中的sysaux数据文件online" target="_blank">使用bbed让rac中的sysaux数据文件online</a>),也可以通过使用_allow_resetlogs_corruption等隐含参数实现online.本恢复案例中有180个数据文件,160个offline,然后open数据库,所以大量数据文件无法正常online,bbed工作量太大.在恢复过程中不幸遇到ORA-01248<br />
<br />
<strong>数据库resetlogs出现ORA-01248错误</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01248: file 5 was created in the future of incomplete recovery
ORA-01110: data file 5: 'F:\TTDATA\PUBRTS.DAT'
</pre>
<p><strong>alert日志记录</strong></p>
<pre class="brush: bash; title: ; notranslate">
Fri Oct 10 15:09:26 2014
alter database open resetlogs
Fri Oct 10 15:09:26 2014
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
ORA-1248 signalled during: alter database open resetlogs...
Fri Oct 10 15:15:22 2014
alter database open
Fri Oct 10 15:15:22 2014
ORA-1589 signalled during: alter database open...
Fri Oct 10 15:15:30 2014
alter database  open resetlogs
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
ORA-1248 signalled during: alter database  open resetlogs...
</pre>
<p><strong>尝试offline文件然后resetlogs</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt;ALTER DATABASE DATAFILE 5  OFFLINE;

Database altered.


sql&gt;ALTER DATABASE OPEN RESETLOGS；

ERROR at line 1:
ORA-01245: ffline file 5 will be lost if resetlogs is done
ORA-01110: data file 5: 'F:\TTDATA\PUBRTS.DAT'
</pre>
<p><strong>alert日志</strong></p>
<pre class="brush: bash; title: ; notranslate">
Fri Oct 10 15:19:37 2014
ALTER DATABASE DATAFILE 5 offline
Fri Oct 10 15:19:37 2014
Completed: ALTER DATABASE DATAFILE 5 offline
Fri Oct 10 15:19:40 2014
alter database open resetlogs
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
ORA-1245 signalled during: alter database open resetlogs...
</pre>
<p>出现该错误原因是由于数据库是非归档模式,offline数据文件需要使用offline drop</p>
<pre class="brush: bash; title: ; notranslate">
Fri Oct 10 15:22:16 2014
alter database datafile 5 offline drop
Fri Oct 10 15:22:17 2014
Completed: alter database datafile 5 offline drop
Fri Oct 10 15:23:13 2014
alter database open resetlogs
Fri Oct 10 15:23:14 2014
Fri Oct 10 15:23:49 2014
RESETLOGS after complete recovery through change 1422423346
Resetting resetlogs activation ID 3503292347 (0xd0cfffbb)
Fri Oct 10 15:24:01 2014
Setting recovery target incarnation to 3
Fri Oct 10 15:24:04 2014
Assigning activation ID 3649065262 (0xd980512e)
LGWR: STARTING ARCH PROCESSES
ARC0 started with pid=23, OS id=3772
Fri Oct 10 15:24:04 2014
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=24, OS id=3668
Fri Oct 10 15:24:05 2014
Thread 1 opened at log sequence 1
  Current log# 1 seq# 1 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\CLTTDB\REDO01.LOG
Successful open of redo thread 1
Fri Oct 10 15:24:05 2014
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri Oct 10 15:24:05 2014
ARC0: STARTING ARCH PROCESSES
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC2 started with pid=25, OS id=636
Fri Oct 10 15:24:06 2014
ARC0: Becoming the 'no SRL' ARCH
Fri Oct 10 15:24:06 2014
ARC1: Becoming the heartbeat ARCH
Fri Oct 10 15:24:06 2014
SMON: enabling cache recovery
Fri Oct 10 15:24:07 2014
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
File #5 is offline, but is part of an online tablespace.
data file 5: 'F:\TTDATA\PUBRTS.DAT'
Dictionary check complete
Fri Oct 10 15:24:19 2014
SMON: enabling tx recovery
Fri Oct 10 15:24:19 2014
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=26, OS id=868
Fri Oct 10 15:24:21 2014
LOGSTDBY: Validating controlfile with logical metadata
Fri Oct 10 15:24:21 2014
LOGSTDBY: Validation complete
Completed: alter database open resetlogs
</pre>
<p>open成功后,再次resetlogs库,实现数据文件online</p>
<pre class="brush: bash; title: ; notranslate">
Fri Oct 10 15:28:44 2014
ALTER DATABASE DATAFILE 5 online
Fri Oct 10 15:28:44 2014
Completed: ALTER DATABASE DATAFILE 5 online
Fri Oct 10 15:31:46 2014
alter database open resetlogs
Fri Oct 10 15:31:46 2014
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
Setting recovery target incarnation to 4
Fri Oct 10 15:32:00 2014
Assigning activation ID 3649091231 (0xd980b69f)
LGWR: STARTING ARCH PROCESSES
ARC0 started with pid=23, OS id=700
Fri Oct 10 15:32:00 2014
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=24, OS id=3360
Fri Oct 10 15:32:01 2014
Thread 1 opened at log sequence 1
  Current log# 1 seq# 1 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\CLTTDB\REDO01.LOG
Successful open of redo thread 1
Fri Oct 10 15:32:01 2014
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri Oct 10 15:32:01 2014
ARC0: STARTING ARCH PROCESSES
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC2 started with pid=25, OS id=2016
Fri Oct 10 15:32:02 2014
ARC0: Becoming the 'no SRL' ARCH
Fri Oct 10 15:32:02 2014
ARC1: Becoming the heartbeat ARCH
Fri Oct 10 15:32:02 2014
SMON: enabling cache recovery
Fri Oct 10 15:32:03 2014
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
Fri Oct 10 15:32:15 2014
Dictionary check complete
Fri Oct 10 15:32:15 2014
SMON: enabling tx recovery
Fri Oct 10 15:32:15 2014
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=26, OS id=256
Fri Oct 10 15:32:17 2014
LOGSTDBY: Validating controlfile with logical metadata
Fri Oct 10 15:32:17 2014
LOGSTDBY: Validation complete
Completed: alter database open resetlogs
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/08/%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1system%e5%9d%8f%e5%9d%97%e6%95%b0%e6%8d%ae%e5%ba%93%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">记录一次system表空间坏块(ORA-01578)数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/08/%e5%8f%88%e4%b8%80%e8%b5%b7%e5%ad%98%e5%82%a8%e6%95%85%e9%9a%9c%e5%af%bc%e8%87%b4ora-00333-ora-00312%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">又一起存储故障导致ORA-00333 ORA-00312恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/07/%e8%af%afdrop-tablespace%e5%90%8e%e4%bd%bf%e7%94%a8flashback-database%e9%97%aa%e5%9b%9e%e5%bc%82%e5%b8%b8%e5%a4%84%e7%90%86.html" rel="bookmark" class="crp_title">误drop tablespace后使用flashback database闪回异常处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/07/%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1ora-600-3004-%e6%81%a2%e5%a4%8d%e8%bf%87%e7%a8%8b%e5%92%8c%e5%a4%84%e7%90%86%e6%80%9d%e8%b7%af.html" rel="bookmark" class="crp_title">记录一次ORA-600 3004 恢复过程和处理思路</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/06/%e6%95%b0%e6%8d%ae%e5%ba%93%e6%81%a2%e5%a4%8d%e5%8e%86%e5%8f%b2%e5%86%8d%e6%ac%a1%e5%88%b7%e6%96%b0%e5%88%b0oracle-7-3-2%e7%89%88%e6%9c%ac-redo%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">数据库恢复历史再次刷新到Oracle 7.3.2版本&#8212;redo异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/10/ora-27069-skgfdisp-%e5%b0%9d%e8%af%95%e5%9c%a8%e6%96%87%e4%bb%b6%e8%8c%83%e5%9b%b4%e5%a4%96%e6%89%a7%e8%a1%8c-io.html" rel="bookmark" class="crp_title">ORA-27069: skgfdisp: 尝试在文件范围外执行 I/O</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/08/oracle-8-1-7-%e6%95%b0%e6%8d%ae%e5%ba%93ora-600-4000%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORACLE 8.1.7 数据库ORA-600 4000故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2019/02/ora-01205-recovery.html" rel="bookmark" class="crp_title">ORA-01205: not a data file &#8211; type number in header is 0</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/05/ora-01171.html" rel="bookmark" class="crp_title">ORA-01171: datafile N going offline due to error advancing checkpoint</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/03/ora-00600kcrf_resilver_log_1%e5%bc%82%e5%b8%b8%e6%81%a2%e5%a4%8d.html" rel="bookmark" class="crp_title">ORA-00600[kcrf_resilver_log_1]异常恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2014/05/%e6%95%b0%e6%8d%ae%e5%ba%93%e6%81%a2%e5%a4%8d%e9%81%ad%e9%81%87ora-006003705.html" rel="bookmark" class="crp_title">数据库恢复遭遇ORA-00600[3705]</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%e6%96%87%e4%bb%b6%e7%9a%84%e4%b8%89%e4%b8%aa%e5%88%9b%e5%bb%ba%e4%b8%80%e7%82%b9%e7%82%b9%e6%8e%a2%e8%ae%a8.html" rel="bookmark" class="crp_title">数据文件的三个创建SCN一点点探讨</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2014/10/%e9%80%9a%e8%bf%87%e5%a4%9a%e6%ac%a1%e8%a7%84%e9%81%bf%e7%b1%bb%e4%bc%bcora-01248-file-n-was-created-in-the-future-of-incomplete-recovery%e9%94%99%e8%af%af.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
