ORA-01113: file N needs media recovery
OracleWhat does it mean?
A datafile is being brought online or the database is being opened, but the file is inconsistent; media recovery must be applied first before proceeding. The file is at an older/inconsistent SCN than the control file expects.
Why does it happen?
The datafile was restored from an old backup, redo was not applied while it was offline, or the file is not current after an instance/storage crash. Typically caused by skipping the recover step after a restore, or by a file staying offline for a long time.
How to fix it
Recover the file or the database: RECOVER DATAFILE N; or RECOVER DATABASE; then ALTER DATABASE DATAFILE N ONLINE; or ALTER DATABASE OPEN; Make sure the required archived logs are accessible. With RMAN: after a RESTORE if needed, run RECOVER DATAFILE N;. Follow alert.log to see which logs are requested.