Oracle Rman recovers to offsite, heterogeneous

Source: Internet
Author: User

The original database server uses Rman for a full-library backup, and then restores the exact database on the offsite server

1.1Original Server Backup Database

The first step is to view the database instance name and DBID

Connected to target DATABASE:DB3 (dbid=2060124769, not open)

Step two, make a full backup

Backup as Compressed BACKUPSET database

Include current controlfile format '/orabak/db_%d_%t_%s '

Plus archivelog format '/orabak/arch_%d_%t_%s ';

The third step is to view the location of the database files: /home/oracle/oradata/db3/

Fourth Step, the backup file Arch_db3_20140910_8 and the db_ db3_20140910_7 copy on a different machine /home/oracle/orabak

1.2Create a database on the destination server

The first step is to create a database with the same instance name (db3)and the same location as the database file (/home/oracle/oradata/db3/).

The second step is to close the instance and boot to the nomount state. sql>startup nomount;

The third step, set dbid and the original database dbid the same

Rman target/

Recovery manager:release 10.2.0.5.0-production on Thu Sep 11 19:53:50 2014

Copyright (c) 1982, Oracle. All rights reserved.

Connected to target DATABASE:DB3 (not mounted)

Rman> set dbid 2060124769

Executing Command:set DBID

Fourth Step, restore the control file

rman> restore Controlfile from '/home/oracle/db_db3_20140910_7 ';

Starting restore at 11-sep-14

Using target database control file instead of recovery catalog

Allocated Channel:ora_disk_1

Channel ora_disk_1:sid=153 Devtype=disk

Channel ora_disk_1:restoring Control File

Channel Ora_disk_1:restore complete, elapsed time:00:00:05

Output Filename=/home/oracle/oradata/db3/db3/control01.ctl

Output Filename=/home/oracle/oradata/db3/db3/control02.ctl

Output Filename=/home/oracle/oradata/db3/db3/control03.ctl

Finished restore at 11-sep-14

Fifth step,Mount database

Rman> ALTER DATABASE Mount;

Database mounted

Released Channel:ora_disk_1

Sixth step, register the backup set copied from the source database to Rman .

rman> catalog start with '/home/oracle/orabak ';

Searching for all files that match the Pattern/home/oracle/orabak

List of Files Unknown to the Database

=====================================

File Name:/home/oracle/orabak/arch_db3_20140910_8

File Name:/home/oracle/orabak/db_db3_20140910_7

Really want to catalog the above files (enter YES or NO)? Yes

Cataloging files ...

Cataloging done

Seventh step, restore the archive log

rman> restore Archivelog all;

Starting restore at 11-sep-14

Using channel Ora_disk_1

Archive log thread 1 sequence 6 is already on disk as FILE/ORACLE/PRODUCT/10.2.0.5/DBS/ARCH1_6_857918757.DBF

Channel ora_disk_1:starting archive log restore to default destination

Channel ora_disk_1:restoring Archive Log

Archive Log thread=1 sequence=3

Channel ora_disk_1:reading from backup Piece/home/oracle/orabak/arch_db3_20140910_1

Channel ora_disk_1:restored backup Piece 1

Piece Handle=/home/oracle/orabak/arch_db3_20140910_1 tag=tag20140910t172944

( Note: If the archive log is not restored,

rman> Recover database;

Starting recover at 11-sep-14

Using channel Ora_disk_1

Starting Media recovery

Unable to find archive log

Archive log thread=1 sequence=7 )

eighth step, restore the database file ( because the destination database and the original database have the same data file location, it is simpler )

rman> Restore Database;

Starting restore at 11-sep-14

Using channel Ora_disk_1

Channel ora_disk_1:starting datafile backupset restore

Channel ora_disk_1:specifying DataFile (s) to the restore from backup set

restoring DataFile 00001 to/home/oracle/oradata/db3/system01.dbf

restoring DataFile 00002 to/home/oracle/oradata/db3/undotbs01.dbf

restoring DataFile 00003 to/home/oracle/oradata/db3/sysaux01.dbf

restoring datafile 00004 to/home/oracle/oradata/db3/users01.dbf

Channel ora_disk_1:reading from backup Piece/home/oracle/orabak/db_db3_20140910_6

Channel ora_disk_1:restored backup Piece 1

Piece Handle=/home/oracle/orabak/db_db3_20140910_6 tag=tag20140910t173540

Nineth step, restore the database

rman> recover database;

Starting recover at 11-sep-14

Using target database control file instead of recovery catalog

Allocated Channel:ora_disk_1

Channel ora_disk_1:sid=152 Devtype=disk

Starting Media recovery

Media recovery complete, elapsed time:00:00:03

Finished recover at 11-sep-14

Tenth step, start the database

ALTER DATABASE open resetlogs;

Oracle Rman recovers to offsite, heterogeneous

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.