The problem is encountered in standby database using Rman to restore the read-only table space on the main library exclude.
Database recovery completed, but recovery was not possible when restoring a read-only tablespace that was exclude by the main library:
rman> restore Tablespace Clubstat2_bak;
Starting restore at 14-feb-11
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=1094 Devtype=disk
File excluded from whole database backup
File is excluded from whole database backup
File excluded from whole database backup
File is excluded from whole database backup
Restore not done; All files readonly, offline, or already restored
Finished restore at 14-feb-11
It is easy for the main library to solve this problem simply by taking advantage of the Rman configure exclude clear command, but for the standby database, this method is not possible:
Rman> show exclude;
RMAN configuration parameters are:
CONFIGURE EXCLUDE for tablespace ' Clubstat2_bak ';
Rman> configure exclude for tablespace ' Clubstat2_bak ' clear;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR message STACK follows ===============
RMAN-00571: ===========================================================
Rman-03002:failure of Configure command at 02/14/2011 00:07:48
Rman-05021:this configuration cannot is changed for a BACKUP or STANDBY control file
The error message is clear, the current control file is a standby control file and cannot run the Configure exclude command.
A simple workaround is to run the Configure EXCLUDE for tablespace ' clubstat2_bak ' Clear command in the main library, and then create standby controlfile, Restores this read-only table space with the newly created standby control file.
However, because the current target database is using ASM, the new data file name and the main library name are not the same when the other data files are restored, and they are already written to the control file, and if you use the new control file, you will need to manually rename all the data files. Of course, you can also use the new control file to restore the read-only table space, in exchange for the original control file, but this method appears to be relatively troublesome, but also error prone.
Finally, using the method of the main library copy datafile, the copy of the data file is generated, the copy of the data file is copied to the repository by using the Catalog Datafilecopy command to add the copy of the data file to the control file, and then use the copy The datafilecopy command copies the data file of the read-only tablespace to the location specified in ASM, thereby restoring the read-only tablespace in a disguised form.