Oracle Error RMAN-06096: SWITCH required for newname of datafile string to take effect

Oracle Error Message

RMAN-06096: SWITCH required for newname of datafile string to take effect

Reason for the Error

A SET NEWNAME was issued for this datafile, but no SWITCH command was issued before the RECOVER command.

Solution

Issue a SWITCH command to make the newname take effect before doing RECOVER.