Oracle Database Rman Geo-recovery

Source: Internet
Author: User

I want to do two sets of RAC between the data guard, because Datafile,controlfile, even archivelog are stored in ASM, the direct copy of the data is a bit unrealistic, ASM disk is always to use, so want to do from a library Rman full backup, Then copy the backup files to the B-Library to do the Rman recovery, the original intention is so simple, the result has encountered n many toss, can not be achieved, the following is my own after countless tests to get the method.

Oracle version: 11.2.0.0

First set of RAC a PS: front hostname, colon followed by instancename
Rac1:orcl1
Rac2:orcl2
Rac3:orcl3

Second set of RAC B
Rac8:orcl1
Rac9:orcl2

I've created two sets of RAC, and I've created the ORCL database on top of it, and I've done some work on the group a RAC database, and I hope these new table data will appear on RAC B as well. All I have to do now is to use Rman on Rac1 to make a full backup of the database and copy the backup files to the Rac8, and then do the Rman recovery so that Rac8 is a copy of the Oracle database on RAC1.

1, Rac1 do Rman full backup

Log on to Rac1 and use Rman to back up the database as follows:
[[email protected] ~]$ Rman target/
Rman> Backup Database format '/U01/APP/ORACLE/BACKUP/ORCL01.DBF ';
A successful backup will tell me:
Data file backup file is/u01/app/oracle/backup/orcl01.dbf '
Controlfile,spfile backup file is/u01/app/oracle/backup/c-1351646173-20130822-00
Note: I added the format parameter back to my specified file path and name, because when the remote recovery, Rman read the backup file directory and need to be consistent with the backup directory, if this side does not use format, backup to the default ASM disk, It is difficult for the backup file to be copied to an offsite ASM disk, such as the problem I encountered is that the default backup to ASM file name parameter is too long to replicate to an offsite ASM disk

2. Copy backup files from Rac1 to Rac8

Files that need to be copied as above:
Data file backup file is/u01/app/oracle/backup/orcl01.dbf '
Controlfile,spfile backup file is/u01/app/oracle/backup/c-1351646173-20130822-00
Copy to Rac8 still placed under the same path, set with the same permissions, generally Oracle:oinstall permissions

3, Rac8 to do the Rman recovery

We just need to restore controlfile and datafile.

As a logical point of view, backup recovery should use the same spfile, but we see that the A-group (www.111cn.net) RAC is 3 nodes, and the B-group RAC is 2 nodes, and what I want to say here is that the configuration of the two sets of RAC servers is different, and the information for the nodes is defined in SPFile. The associated initialization information is also defined, and this information for Group A RAC is not applicable on group B, so I only restore controlfile and datafile here.

On-line to see that the offsite Rman recovery needs to set the local value of dbid for a long time, found that this is not needed, dbid has been defined in Controlfile, as long as the restoration of controlfile,dbid nature is the same.

Recovering controlfile requires the database to be in Nomount state
[[email protected] ~]$ uniread sqlplus '/as Sysdba '
sql> shutdown immediate;
sql> shutdown Nomount;
[Email protected] ~]$ Uniread Rman target/
rman> restore controlfile from '/u01/app/oracle/backup/c-1351646173-20130822-00′;
It will tell you to be successful again.

Restoring a data file requires the database to be placed in Mount state
[[email protected] ~]$ uniread sqlplus '/as Sysdba '
sql> shutdown immediate;
sql> shutdown Mount;
Note: The status of boot to mount may require parameter resetlogs
[Email protected] ~]$ Uniread Rman target/
Rman> list Backup of database;
You can see the backup file information
rman> Restore Database;
rman> Recover database;
This is the end of the recovery.

4. Start Oracle to open state on Rac8

It makes sense to say this alone, and after the recovery, because the data dictionary on the RAC8 has changed, all of him will error Ora-39700:database must is opened with UPGRADE option
Then we need to boot into upgrade mode.
sql> startup UPGRADE;
Error: Ora-39701:database must is mounted EXCLUSIVE for UPGRADE or downgrade
The workaround for this error is to disable the cluster parameters
Sql> STARTUP Nomount;
sql> ALTER SYSTEM SET cluster_database=false scope=spfile;
Sql> SHUTDOWN IMMEDIATE;
sql> startup UPGRADE;
This starts the success, then has to remember to turn on the cluster parameters.
From:http://www.111cn.net/database/oracle/50477.htm

Oracle Database Rman Geo-recovery

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.