… or: the problem of backup association
From time to time i come across the same problems in data guard configurations using rman-to-disk: Backups taken on the standby database are not taken into account when trying to perform an rman recovery on the primary site and vice versa.
This is an expected behavior according to the oracle documentation:
The accessibility of a backup is different from its association. In a Data Guard environment, the recovery catalog considers disk backups as accessible only to the database with which it is associated, whereas tape backups created on one database are accessible to all databases. If a backup file is not associated with any database, then the row describing it in the recovery catalog view shows
null for the
SITE_KEY column. By default, RMAN associates files whose
null with the database to which it is connected as
RMAN commands such as
CROSSCHECK work on any accessible backup. For example, for a
RECOVER COPY operation, RMAN considers only image copies that are associated with the database as eligible to be recovered. RMAN considers the incremental backups on disk and tape as eligible to recover the image copies. In a database recovery, RMAN considers only the disk backups associated with the database and all files on tape as eligible to be restored.
To illustrate the differences in backup accessibility, assume that databases
standby1 reside on different hosts. RMAN backs up datafile 1 on
/prmhost/disk1/df1.dbf on the production host and also to tape. RMAN backs up datafile 1 on
/sbyhost/disk2/df1.dbf on the standby host and also to tape. If RMAN is connected to database
prod, then you cannot use RMAN commands to perform operations with the
/sbyhost/disk2/df1.dbf backup located on the standby host. However, RMAN does consider the tape backup made on
standby1 as eligible to be restored.
Note: This is a quote from the 11g R1 documentation. The same text apprears in 10g R2 documentation as well.