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

jane_pop發表於2014-10-22
使用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部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1307255/,如需轉載,請註明出處,否則將追究法律責任。

相關文章