How to set the recovery of standby database read-only table space after exclude in Oracle

Source: Internet
Author: User
Tags backup

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.