數據庫現狀 控制文件 控制文件中數據文件信息 數據文件頭信息 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
原文地址:通過多次resetlogs規避類似ORA-01248: file N was created in , 感謝原作者分享。
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com