Oracle Error RMAN-04022: target database mount id string does not match channel’s mount id string

Oracle Error Message

RMAN-04022: target database mount id string does not match channel’s mount id string

Reason for the Error

The CONNECT clause in the ALLOCATE command has resulted in a connection to a database which is not the same as the one used to connect to the target database.

Solution

Verify that the CONNECT string connects to the same database as the one specified in the TARGET connection for the CONNECT command.