Oracle error
ORA-01113
ORA-01113: file %s needs media recovery
What usually causes it
A datafile is older than the rest of the database: it was restored, taken offline, or left in backup mode.
What to check first
RECOVER DATAFILE n (in RMAN or SQL*Plus), then bring it online. After a crash during a user-managed hot backup, ALTER DATABASE END BACKUP clears it.
Scripts that help
- Datafiles with size and autoextend limitsEvery datafile, its current size, whether it can grow, and how far. Files with AUTOEXTEND NO in a busy tablespace are the ones that page you at night.
- Datafiles without a recent backupDatafiles with no backup of any kind in the last two days, or none at all. A new datafile added after the last full backup shows up here first.