SYMPTOMS
Regular backups of the target database were taken using the below incremental level 0 and incremental level 1 backups scripts:
run {
#allocate channel ch1 device type disk;
backup format '${RMAN_BACKUP_LOC}/%d_%U' device type disk incremental level 0 as compressed backupset database filesperset=1 plus archivelog ;
delete archivelog all completed before 'sysdate-1' device type disk backed up 1 times to device type disk;
delete noprompt obsolete;
}
run {
backup format '${RMAN_BACKUP_LOC}/%d_%U' device type disk incremental level 1 as compressed backupset database filesperset=1 plus archivelog ;
delete archivelog all completed before 'sysdate-1' device type disk backed up 1 times to device type disk;
}
When a duplicate was tried using the below command it failed with the error "RMAN-06053: unable to perform media recovery because of missing log"
{
allocate auxiliary channel dupe1 type disk;
allocate auxiliary channel dupe2 type disk;
duplicate target database to SDTEST pluggable database lcdt1, root until time "to_date('30-AUG-2019 19:16:10','DD-MON-YYYY HH24:MI:SS')";
}
CHANGES
No changes were done in backup schedule or the backup and duplicate scripts.
All the backups taken using the above mentioned scripts were present at the desire location.
CAUSE
From the debug trace it was found that RMAN was looking for the oldest archivelogs to create the pdb$seed datafiles.
DBGMISC: Retrieved file 2, created: 227, stopscn: 165901631, blocks: 76800 (rfno: 1, ts: SYSTEM [0]): [15:35:39.075] (krmkgdf)
DBGMISC: Name: +DATAC2/CTEST1AX_DCB/652A926A0BFD31ECE0539E60B80AE026/DATAFILE/system.348.1018106829 (krmkgdf)
DBGMISC: Auxname: (krmkgdf)
DBGMISC: Creation Thread: 1; Creation Size : 76800 [15:35:39.075] (krmkgdf)
DBGMISC: Stop scn (165901631) is in the future of until scn (0) with no catalog, do not trust stopSCN [15:35:39.075] (krmkgdf)
DBGMISC: File 2 is online [15:35:39.075] (krmkgdf)
DBGMISC: Retrieved file 4, created: 4205, stopscn: 165901631, blocks: 76800 (rfno: 4, ts: SYSAUX [1]): [15:35:39.076] (krmkgdf)
DBGMISC: Name: +DATAC2/CTEST1AX_DCB/652A926A0BFD31ECE0539E60B80AE026/DATAFILE/sysaux.397.1018106829 (krmkgdf)
DBGMISC: Auxname: (krmkgdf)
DBGMISC: Creation Thread: 1; Creation Size : 76800 [15:35:39.076] (krmkgdf)
DBGMISC: Stop scn (165901631) is in the future of until scn (0) with no catalog, do not trust stopSCN [15:35:39.076] (krmkgdf)
DBGMISC: File 4 is online [15:35:39.076] (krmkgdf)
DBGRCVMAN: ENTERING translateArchivedLogSCNRange
DBGRCVMAN: tc_thread=
DBGRCVMAN: tc_fromSCN=227
DBGRCVMAN: tc_toSCN=281474976710656
DBGRCVMAN: tc_fromSeq=
DBGRCVMAN: tc_fromTime=
DBGRCVMAN: tc_toTime=
DBGRCVMAN: tc_toSeq=
DBGRCVMAN: tc_pattern=
DBGRCVMAN: OPENING cursor translateArcLogSCNRange2 in translateArchivedLogSCNRange
DBGRCVMAN: translateArchivedLogSCNRange using cursor 2 fromSCN=227 toSCN=281474976710656
DBGRCVMAN: getArchivedLogDoingRecovery set to TRUE
RMAN-03090: Starting restore at 04-SEP-2019 15:26:48
RMAN-06064: creating datafile file number=2 name=+DATAC2
RMAN-06064: creating datafile file number=4 name=+DATAC2
At the source database the following commands were run to check the backups of the pdb$seed datafiles but it did not list any backups:
Source: RMAN> list backup of datafile 2,4;
SOLUTION
To force a pdb$seed backup the following can be run:
RMAN> BACKUP PLUGGABLE DATABASE "PDB$SEED" force;
In this case the level 0 backup script was edited with the force option as below so that the pdb$seed gets backed up in every level 0 backup:
RMAN> backup format '${RMAN_BACKUP_LOC}/%d_%U' device type disk incremental level 0 as compressed backupset database force filesperset=1 plus archivelog ;
The next attempt of duplicate with the latest backups completed without issues.