ITPub博客

首页 > 数据库 > Oracle > ORA-00322: log 3 of thread 1 is not current copy

ORA-00322: log 3 of thread 1 is not current copy

原创 Oracle 作者:jane_pop 时间:2014-10-22 15:53:44 0 删除 编辑
使用rman进行recover database的时候出现ORA-00322的错误:
RMAN> recover database;

Starting recover at 21-OCT-14
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 2 is already on disk as file /u01/app/archivelog/dest1/1_2_861389770.dbf
archived log for thread 1 with sequence 3 is already on disk as file /u01/app/archivelog/dest1/1_3_861389770.dbf
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/archivelog/dest1/1_4_861389770.dbf
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/archivelog2/dest1/1_5_861389770.dbf
archived log for thread 1 with sequence 6 is already on disk as file /u01/app/archivelog2/dest1/1_6_861389770.dbf
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=1
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_10_19/o1_mf_annnn_TAG20141019T205525_b491xgmf_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_10_19/o1_mf_annnn_TAG20141019T205525_b491xgmf_.bkp tag=TAG20141019T205525
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/archivelog/dest2/1_1_861389770.dbf thread=1 sequence=1
archived log file name=/u01/app/archivelog/dest1/1_2_861389770.dbf thread=1 sequence=2
archived log file name=/u01/app/archivelog/dest1/1_3_861389770.dbf thread=1 sequence=3
archived log file name=/u01/app/archivelog/dest1/1_4_861389770.dbf thread=1 sequence=4
archived log file name=/u01/app/archivelog2/dest1/1_5_861389770.dbf thread=1 sequence=5
archived log file name=/u01/app/archivelog2/dest1/1_6_861389770.dbf thread=1 sequence=6
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/21/2014 01:00:49
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/u01/app/archivelog2/dest1/1_6_861389770.dbf'
ORA-00283: recovery session canceled due to errors
ORA-00322: log 3 of thread 1 is not current copy
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'

解决的办法是执行如下命令(如果日志文件已经归档,则将"unarchived"去掉):
SYS@orcl 21-OCT-14>alter database clear unarchived logfile '/u01/app/oracle/oradata/orcl/redo03.log'; 

Database altered. 

重新执行recover database ,成功。
SYS@orcl 21-OCT-14>alter database clear unarchived logfile '/u01/app/oracle/oradata/orcl/redo03.log'; 

Database altered. 

SYS@orcl 21-OCT-14>alter database open; 
alter database open 
* 
ERROR at line 1: 
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open 


SYS@orcl 21-OCT-14>alter database open resetlogs; 

Database altered.


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29800581/viewspace-1307255/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
So glad that I'm dark enough to see your light.

注册时间:2014-08-11

  • 博文量
    83
  • 访问量
    563746