Oracle Database Rman Offsite Recovery

Source: Internet
Author: User
Tags sqlplus


I want to do two sets of RAC between the data guard, because Datafile,controlfile, and even archivelog are stored on the ASM, direct copy of the data is a bit unrealistic, ASM disk is always used, so want to do from a library Rman full backup, Then copy the backup file to the B library to do Rman recovery, the original intention is so simple, the results have encountered more than n toss, can not be achieved, the following is my own countless times to test the method.

Oracle version: 11.2.0.0

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

Second group of RAC B
Rac8:orcl1
Rac9:orcl2

I've created two sets of RAC, and I've created the ORCL database, and I've done some work on the A-group RAC database, and I want the new table data to appear on RAC B as well. All I have to do now is to use Rman to do a full backup of the database on the Rac1 and then copy the backup file 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:
[Oracle@rac1 ~]$ Rman Target/
Rman> Backup Database format '/U01/APP/ORACLE/BACKUP/ORCL01.DBF ';
Backup success 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 have the format parameter backed up to the file path and name I specified, because in an offsite recovery, Rman reads the backup file in the same directory as it needs and when it is backed up, and if you do not use format here, back up to the default ASM disk, It is difficult to copy the backup file to the ASM disk offsite, such as the problem I have encountered is that the default backup to the ASM file name parameter is very long cannot be replicated to an offsite ASM disk

2. Copy backup files from Rac1 to Rac8

Files that need to be copied are as follows:
Data file backup file is/u01/app/oracle/backup/orcl01.dbf '
Controlfile,spfile backup file is/u01/app/oracle/backup/c-1351646173-20130822-00
After copying to Rac8, it is still placed under the same path, setting with the same permissions, typically Oracle:oinstall permissions

3, Rac8 to do the Rman recovery

We just need to get controlfile and datafile back on our side.

Backup recovery is supposed to use the same spfile, but we see a group of RAC is 3 nodes, B group RAC is 2 nodes, I also want to say that the two sets of RAC server configuration is different, SPFile defined the node information, also defines the relevant initialization information, This information on Group A RAC does not apply to Group B, so I only restore controlfile and datafile here.

Online See said Rman restore need to set up off-site dbid value, toss for a long time, found this is not needed, dbid has been defined in Controlfile, as long as the restoration of controlfile,dbid nature is the same.

Restoring controlfile requires the database to be placed in Nomount state
[Oracle@rac8 ~]$ uniread sqlplus '/as Sysdba '
sql> shutdown immediate;
sql> shutdown Nomount;
[Oracle@rac8 ~]$ uniread Rman target/
rman> restore controlfile from '/u01/app/oracle/backup/c-1351646173-20130822-00′;
It'll tell you it's over.

Restoring data files requires the database to be placed in Mount state
[Oracle@rac8 ~]$ uniread sqlplus '/as Sysdba '
sql> shutdown immediate;
sql> shutdown Mount;
Note: The state of boot to mount may require additional parameters Resetlogs
[Oracle@rac8 ~]$ 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, Rac8 on the launch of Oracle to open state

It makes sense to say this alone, after the recovery, because the information on the data dictionary on the RAC8 has changed, all of which he will error Ora-39700:database must is opened with UPGRADE option
then we need to boot to upgrade mode.
Sql> startup UPGRADE;
Error: Ora-39701:database must is mounted EXCLUSIVE for UPGRADE or downgrade
This error resolution is to ban cluster parameters
Sql> STARTUP N Omount;
sql> ALTER SYSTEM SET cluster_database=false scope=spfile;
Sql> SHUTDOWN IMMEDIATE;
Sql> startup UPGRADE;
This starts successfully, and then remembers to turn on the cluster parameters.

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.