VDB Creation fails in Oracle 12.1 and 12.2 if during RMAN backup job new datafiles have been added

If you running database version 12.1.0.1 or 12.2.0.1 VDB creation may fail if during RMAN backup job datafiles have been added.

This is due to Oracle bug - Bug 22251416  RMAN-20505 ORA-1244 from RMAN Recover after recreating the Controlfile with missing file recently added.

 

In the alert log of VDB you will see a similar error:

Media Recovery Log o1_mf_1_176_kqdc2nfj_.arc 2022-11-17T12:43:01.713718+00:00 (5):File #35 added to control file as 'UNNAMED00035'. Originally created as: (5):'/home/oracle/data/DB12/EDA3A850F5AD3631E053E71B1FAC1F98/datafile/o1_mf_p05_dw_t_kqdbz8p0_.dbf' 2022-11-17T12:43:01.846522+00:00 Media Recovery failed with error 1244 2022-11-17T12:43:01.972265+00:00 Errors in file /main_pool/6407195706/diag/rdbms/tst12/tst12/trace/tst12_m000_1827.trc: ORA-01110: data file 1: '/main_pool/6407195706/DB/data_D-DB12_I-1966008019_TS-SYSTEM_FNO-1_qv1d17ic' Recovery interrupted! Some recovered datafiles maybe left media fuzzy Media recovery may continue but open resetlogs may fail

 

There are 3 options to workaround the issue:

  1. Refresh Golden Image again and make sure that during RMAN refresh job there are no new datafiles added, then run creation of VDB from the newly created snapshot.

  2. Apply “12.2.0.1.221018 (Oct 2022) Database Release Update” Patch 34518562 - however this patch requires extended support license.

  3. Upgrade database to Oracle 19c