Oracle Error RMAN-06505: specified DATABASE: string does not match previous DATABASE: string

Oracle Error Message

RMAN-06505: specified DATABASE: string does not match previous DATABASE: string

Reason for the Error

SET DBID was used to set a DBID that translated into a database name that does not match newly specified database name or a previous SET DATABASE set a different database name.

Solution

Verify that the correct DBID was specified or avoid using the SET DATABASE command.