通过多次resetlogs规避类似ORA-01248: file N was created in
数据库现状 控制文件 控制文件中数据文件信息 数据文件头信息 redo信息 根据当前数据库恢复检查脚本(Oracle Database Recovery Check)收集的信息,数据库的是非归档状态,而且redo已经覆盖,数据库datafile 5 无法直接online.遇到这样情况,可以使用bbed修改文件
数据库现状
控制文件
控制文件中数据文件信息
数据文件头信息
redo信息
根据当前数据库恢复检查脚本(Oracle Database Recovery Check)收集的信息,数据库的是非归档状态,而且redo已经覆盖,数据库datafile 5 无法直接online.遇到这样情况,可以使用bbed修改文件头scn实现online(使用bbed让rac中的sysaux数据文件online),也可以通过使用_allow_resetlogs_corruption等隐含参数实现online.本恢复案例中有180个数据文件,160个offline,然后open数据库,所以大量数据文件无法正常online,bbed工作量太大.在恢复过程中不幸遇到ORA-01248
数据库resetlogs出现ORA-01248错误
SQL> 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'
alert日志记录
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...
尝试offline文件然后resetlogs
SQL>ALTER DATABASE DATAFILE 5 OFFLINE; Database altered. sql>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'
alert日志
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...
出现该错误原因是由于数据库是非归档模式,offline数据文件需要使用offline drop
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
open成功后,再次resetlogs库,实现数据文件online
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
- 记录一次system表空间坏块(ORA-01578)数据库恢复
- 又一起存储故障导致ORA-00333 ORA-00312恢复
- 误drop tablespace后使用flashback database闪回异常处理
- 数据库恢复历史再次刷新到Oracle 7.3.2版本—redo异常恢复
- 记录一次ORA-600 3004 恢复过程和处理思路
- ORACLE 8.1.7 数据库ORA-600 4000故障恢复
- ORA-27069: skgfdisp: 尝试在文件范围外执行 I/O
- ORA-00600[kcrf_resilver_log_1]异常恢复
原文地址:通过多次resetlogs规避类似ORA-01248: file N was created in , 感谢原作者分享。
上一篇: MySQL服务器的SQL模式_MySQL
下一篇: php写api有什么需要注意的嘛?