Oracle 12cR2 RMAN – ORA-01547, ORA-01194, RMAN-06054

backuporacleoracle-12crestorerman

Oracle 12cR2.

Error:

channel default: deleting archived log(s)

archived log file name=+RECO/…/thread_1_seq_166200.26582.1054942673
RECID=62 STAMP=1054943183

archived log file name=+RECO/…/thread_1_seq_166201.11529.1054941077
thread=1 sequence=166201

channel default: deleting archived log(s)

archived log file name=+RECO/…/thread_2_seq_223357.10403.1054942671
RECID=58 STAMP=1054943182

unable to find archived log

archived log thread=2 sequence=223358

Oracle Error:

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get
error below

ORA-01194: file 4 needs more recovery to be consistent

ORA-01110: data file 4: '+DATA/…/data_d…fno-4'

RMAN-00571:
===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============

RMAN-00571:
===========================================================

RMAN-03002: failure of recover command at 10/28/2020 00:24:13

RMAN-06054: media recovery requesting unknown archived log for thread
2 with sequence 223358 and starting SCN of 1871183322646

My commands:

restore primary controlfile from '/.../RESTORE/..._controlfile_20201027_....rman';

alter database mount;

restore database preview;

The final output part of 'restore database preview;' command:

recovery will be done up to SCN 1871164140237
Media recovery start SCN is 1871164140237
Recovery must be done beyond SCN 1871183871662 to clear datafile fuzziness
Finished restore at 27-OCT-20


catalog start with '/.../RESTORE/';

run
{
set newname for database to '+DATA/.../%U' ;
set newname for tempfile 1 to '+DATA/.../%U';
set newname for tempfile 2 to '+DATA/.../%U';
set newname for tempfile 3 to '+DATA/.../%U';
set newname for tempfile 4 to '+DATA/.../%U';
set newname for tempfile 5 to '+DATA/.../%U';
set until scn 1871183871663;
restore database;
switch datafile all;
switch tempfile all;
recover database;
}

NOTE: all of the full database backuppieces, archivelog backups, daily spfile backup and daily controlfile backup are under this path '/…/RESTORE/'.

I setted my limit to scn 1871183871663 (Recovery must be done beyond SCN 1871183871662 to clear datafile fuzziness + 1) but it says "media recovery requesting unknown archived log for thread 2 with sequence 223358 and starting SCN of 1871183322646."

I couldn't find any clear solution. How can I resolve it?

Best regards,

Best Answer

1871183871663 is bigger than 1871183322646. You do not have the necessary archivelog in the backups for recovering the database beyond SCN 1871183322646.

You simply specified a point in time recovery target that is not included in the backups.