Issue :
OCI Restore failure during Tempfile Creation
Trying to create a new DB System from backup in OCI. Restore fails during “Re-Create Control File” step:
Cause for the issue :
In DCS Agent Debug log, we can see below error occurred during tempfile addition in a particular PDB:
ALTER SESSION SET CONTAINER = “PDBXXXX” ;
Session altered.
ALTER TABLESPACE TEMPORARY_DATA ADD TEMPFILE;
*
ERROR at line 1:
ORA-01264: Unable to create datafile file name
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory
On source system, we checked that this particular PDB had a custom db_create_file_dest value set and it was not inheriting from CDB. Since that custom path is not available on the new DB system, tempfile addition fails.
Fix :
We can use below queries on source to check whether any particular pdb has custom OMF parameters like db_create_file_dest
SQL> col NAME format a30
SQL> select CON_ID,CON_UID,GUID,NAME,OPEN_MODE from v$pdbs;
SQL> select DB_UNIQ_NAME,PDB_UID,NAME,VALUE$ from PDB_SPFILE$;
After verification, unset the custom db_create_file_dest for the pdb:
SQL> alter system reset db_create_file_dest;
Re-check PDB_SPFILE$ view in CDB to ensure the custom OMF parameter is no longer seen. Now, create a new backup after making the changes on source and use the new backup for cloning.