Oracle Error ORA-01124: cannot recover data file string – file is in use or recovery

Oracle Error Message

ORA-01124: cannot recover data file string – file is in use or recovery

Reason for the Error

An attempt to do media recovery found that the file was not available for recovery. Either it is online and the database is open in some instance, or another process is curently doing media recovery on the file.

Solution

Do not do media recovery.