Oracle Error RMAN-20222: datafile name not found in recovery catalog or is ambiguous

Oracle Error Message

RMAN-20222: datafile name not found in recovery catalog or is ambiguous

Reason for the Error

The specified datafile name is not the name of a datafile that is currently part of the target database, or an UNTIL clause has been specified and the file name was for a different datafile at the time specified by the UNTIL clause than it is now.

Solution

Use a datafile number to specify the datafile you want to RESTORE or RECOVER.