Problém
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/oradata/ORCL/datafile/o1_mf_system_cl3dn0fy_.dbf'
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/28/2016 11:24:16
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06102: no channel to restore a backup or copy of log thread 1 seq 62830 lowscn 1276988986
Řešení
Kontrola na původním serveru:
SQL> select r.sequence#, p.handle from v$backup_piece p, v$backup_redolog r where r.set_stamp = p.set_stamp and r.set_count = p.set_count and r.sequence# = 62830; SEQUENCE# HANDLE ---------- -------------------------------------------------------------------- 62830 BE_dtr43fc4_1_1 62830 /admintmp/orcl-e1r43odb_1_1
Obnova na testovém serveru:
RMAN> CATALOG BACKUPPIECE '/admintmp/orcl-e1r43odb_1_1';
using target database control file instead of recovery catalog
cataloged backuppiece
backup piece handle=/admintmp/orcl-e1r43odb_1_1 recid=4 stamp=910353516
RMAN> recover database;
Starting recover at 28-APR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62835
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62836
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62837
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62838
channel ORA_DISK_1: reading from backup piece /admintmp/orcl-eir45nu8_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/admintmp/orcl-eir45nu8_1_1 tag=TAG20160428T113752
channel ORA_DISK_1: restore complete, elapsed time: 00:00:09
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62830
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=62831
channel ORA_DISK_1: reading from backup piece /admintmp/orcl-e1r43odb_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/admintmp/orcl-e1r43odb_1_1 tag=TAG20160427T173434
channel ORA_DISK_1: restore complete, elapsed time: 00:00:36
archive log filename=/oracle/flash_recovery_area/orcl/archivelog/2016_04_28/o1_mf_1_62830_cl3qtdkk_.arc thread=1 sequence=62830
failover to previous backup
unable to find archive log
archive log thread=1 sequence=62831
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/28/2016 12:02:08
RMAN-06055: could not find log sequence 62831 thread 1
RMAN> alter database open resetlogs;
database opened