Oracle Solution for Error ora-38863

Solution for Oracle Error ORA-38863

ORA-38863: datafile string has been restored from an optimized RMAN backup.

What triggered the Error:

Flashback Database could not flash back the file because it was restored from an RMAN optimized backup with deallocated objects. Flashback cannot revert the file to a time before the last deallocation in the datafile backup.

What should we do to fix it:

Restore the file from a backup prior to the Flashback target SCN or time and then retry the command.