- 最后登录
- 2014-11-16
- 在线时间
- 166 小时
- 威望
- 8
- 金钱
- 962
- 注册时间
- 2011-10-26
- 阅读权限
- 10
- 帖子
- 156
- 精华
- 0
- 积分
- 8
- UID
- 71
|
1#
发表于 2011-12-12 16:01:11
|
查看: 7850 |
回复: 7
做了跨越resetlogs的试验http://www.xifenfei.com/2129.html
其中发现一个问题:
- RMAN> recover database;
-
- Starting recover at 2011-12-12 13:49:36
- using channel ORA_DISK_1
-
- starting media recovery
-
- archived log for thread 1 with sequence 1 is already on disk as file /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_1_7gc3ojqw_.arc
- archived log for thread 1 with sequence 2 is already on disk as file /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_2_7gc3okx8_.arc
- archived log for thread 1 with sequence 3 is already on disk as file /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_3_7gc3onnq_.arc
- archived log for thread 1 with sequence 4 is already on disk as file /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_4_7gc3wnvf_.arc
- archived log for thread 1 with sequence 5 is already on disk as file /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_5_7gc3wt48_.arc
- archived log file name=/opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_1_7gc3ojqw_.arc thread=1 sequence=1
- archived log file name=/opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_2_7gc3okx8_.arc thread=1 sequence=2
- archived log file name=/opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_3_7gc3onnq_.arc thread=1 sequence=3
- archived log file name=/opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_4_7gc3wnvf_.arc thread=1 sequence=4
- archived log file name=/opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_5_7gc3wt48_.arc thread=1 sequence=5
- unable to find archived log
- archived log thread=1 sequence=6
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of recover command at 12/12/2011 13:49:39
- RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 6 and starting SCN of 12882851
复制代码
通过这里看出来
sequence=5的归档日志已经应用
然后resetlogs打开数据库
- RMAN> alter database open resetlogs;
-
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of alter db command at 12/12/2011 14:06:04
- ORA-01092: ORACLE instance terminated. Disconnection forced
- ORA-00600: internal error code, arguments: [2898], [5], [12], [], [], [], [], [], [], [], [], []
- Process ID: 26406
- Session ID: 96 Serial number: 7
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- ORA-03114: not connected to ORACLE
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of alter db command at 12/12/2011 14:06:04
- ORA-01092: ORACLE instance terminated. Disconnection forced
- ORA-00600: internal error code, arguments: [2898], [5], [12], [], [], [], [], [], [], [], [], []
- Process ID: 26406
- Session ID: 96 Serial number: 7
复制代码
查看日志文件
- Mon Dec 12 14:05:59 2011
- SMON: enabling cache recovery
- [26406] Successfully onlined Undo Tablespace 2.
- Undo initialization finished serial:0 start:1208679594 end:1208679684 diff:90 (0 seconds)
- Dictionary check beginning
- File #5 is offline, but is part of an online tablespace.
- data file 5: '/opt/oracle/oradata/ora11g/example01.dbf'
- Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_26406.trc (incident=4953):
- ORA-00600: internal error code, arguments: [2898], [5], [12], [], [], [], [], [], [], [], [], []
- Incident details in: /opt/oracle/diag/rdbms/ora11g/ora11g/incident/incdir_4953/ora11g_ora_26406_i4953.trc
- Mon Dec 12 14:06:02 2011
- Dumping diagnostic data in directory=[cdmp_20111212140602], requested by (instance=1, osid=26406), summary=[incident=4953].
- Use ADRCI or Support Workbench to package the incident.
- See Note 411.1 at My Oracle Support for error and packaging details.
- Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_26406.trc:
- ORA-00600: internal error code, arguments: [2898], [5], [12], [], [], [], [], [], [], [], [], []
- Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_26406.trc:
- ORA-00600: internal error code, arguments: [2898], [5], [12], [], [], [], [], [], [], [], [], []
- Error 600 happened during db open, shutting down database
- USER (ospid: 26406): terminating the instance due to error 600
- Mon Dec 12 14:06:03 2011
- Instance terminated by USER, pid = 26406
- ORA-1092 signalled during: alter database open resetlogs...
- opiodr aborting process unknown ospid (26406) as a result of ORA-1092
- Mon Dec 12 14:06:04 2011
- ORA-1092 : opitsk aborting process
复制代码
打开数据库,数据库open,但是还报错,其中一个trace文件
- *** 2011-12-12 14:17:46.627
- Started Serial Media Recovery
- Datafile 5 belongs to incarnation with resetlogs SCN : 12881971, timestamp: 2de0acea
- Media Recovery apply resetlogs offline range for datafile 5, incarnation : 1
- Datafile 5 belongs to incarnation with resetlogs SCN : 12881971, timestamp: 2de0acea
- Dumping database incarnation table:
- Resetlogs 0 scn and time: 0x0000.00c493a4 12/12/2011 14:05:53
- Resetlogs 1 scn and time: 0x0000.00c49033 12/12/2011 13:17:30
- Recovery target incarnation = 4, activation ID = 0
- Influx buffer limit = 37449 min(50% x 74898, 100000)
- Start recovery at thread 1 ckpt scn 12881971 logseq 1 block 2
- Initial buffer sizes: read 1024K, overflow 832K, change 805K
-
- *** 2011-12-12 14:17:46.725
- Media Recovery add redo thread 1
-
- *** 2011-12-12 14:18:47.348
- Media Recovery Log 2011_12_12/o1_mf_1_1_7gc3ojqw_.arc
-
- *** 2011-12-12 14:19:00.198
- Media Recovery Log /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_1_7gc3ojqw_.arc
- Log read is SYNCHRONOUS though disk_asynch_io is enabled!
- Datafile 5 belongs to incarnation with resetlogs SCN : 12881971, timestamp: 2de0acea
-
- *** 2011-12-12 14:19:15.911
- Media Recovery Log /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_2_7gc3okx8_.arc
- Log read is SYNCHRONOUS though disk_asynch_io is enabled!
-
- *** 2011-12-12 14:19:22.638
- Media Recovery Log /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_3_7gc3onnq_.arc
- Log read is SYNCHRONOUS though disk_asynch_io is enabled!
-
- *** 2011-12-12 14:19:31.007
- Media Recovery Log /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_4_7gc3wnvf_.arc
- Log read is SYNCHRONOUS though disk_asynch_io is enabled!
- Datafile 5 belongs to incarnation with resetlogs SCN : 12881971, timestamp: 2de0acea
-
- *** 2011-12-12 14:19:37.116
- Media Recovery Log /opt/oracle/fast_recovery_area/ORA11G/archivelog/2011_12_12/o1_mf_1_5_7gc3wt48_.arc
- Log read is SYNCHRONOUS though disk_asynch_io is enabled!
- Initial buffer sizes: read 1024K, overflow 832K, change 805K
- Thread 1 initialized for new incarnation 1 at scn 12882852
- Media Recovery current incarnation depth : 0
- File 5 (stop scn 12882852) completed recovery at checkpoint scn 12882852
复制代码
查询相关视图
- SQL> select file#,online_status,to_char(change#,'999999999999') from v$recover_file;
-
- FILE# ONLINE_ TO_CHAR(CHANG
- ---------- ------- -------------
- 5 OFFLINE 12881970
-
- SQL> select file#,to_char(checkpoint_change#,'999999999999') from v$datafile;
-
- FILE# TO_CHAR(CHECK
- ---------- -------------
- 1 12902896
- 2 12902896
- 3 12902896
- 4 12902896
- 5 0
-
- SQL> select FILE#,to_char(checkpoint_change#,'999999999999') from v$datafile_header;
-
- FILE# TO_CHAR(CHECK
- ---------- -------------
- 1 12902896
- 2 12902896
- 3 12902896
- 4 12902896
- 5 12881970
复制代码
通过这些证明datafile 5没有应用sequence=5
然后我手工应用 redo log 5 to datafile 5,问题解决,datafile 5 正常online
问题:为什么在rman 做recover时候,提示已经应用了req 5,而最后resetlogs时候,有出现datafile 5没有应用该日志,需要人工去引用 |
|