How to restore an Oracle backup to another machine

Source: Internet
Author: User
Tags backup

Description

(1). The db_name needs to be the same when Rman is backed up to a different machine recovery.

If you want to change to another instance name, you can change it with the NID command after the restore succeeds. The information of the instance name is recorded in the control file, so if the instance name is inconsistent at the time of recovery, the error will be returned.

(2). When the path to recovery is inconsistent with the source library, you need to specify the new location using the SET command in the Restore command and use switch datafile all to update the change information to the control file.

Test environment:

Source database server A, installed in E, backup directory already in e disk;

Source database Server B, installed in Disk F.

------------- -----------------------

First, the source database preparation work

----------------------- -------------

--1. Query dbid

Sql> select Name,dbid from V$database;

NAME DBID

--------- ----------

ORCL 1320546556

--2. Backup source Data db

run {
configure retention policy to recovery window of 14 days;
configure controlfile autobackup on; --自动开启控制文件备份
configure controlfile autobackup format for device type disk to 'E:\backup\controlfile\bak_%F';
allocate channel c1 device type disk format 'E:\backup\data\bak_%u';
allocate channel c2 device type disk format 'E:\backup\data\bak_%u';
sql 'alter system archive log current';
backup incremental level=0 database skip inaccessible
plus archivelog filesperset 20
delete all input;
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;

--or

run {
configure retention policy to recovery window of 14 days;
allocate channel c1 device type disk format 'E:\backup\data\bak_%u';
allocate channel c2 device type disk format 'E:\backup\data\bak_%u';
sql 'alter system archive log current';
backup incremental level=0 database skip inaccessible
plus archivelog filesperset 20
delete all input;
--手动直接指明备份文件名和路径
backup current controlfile tag='bak_ctrollfile' format='E:\backup\controlfile\bak_ctl_file_%U_%T';
backup spfile tag='bak_spfile' format='E:\backup\controlfile\bak_spfile_%U_% T';
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;

--3. Manual Backup SPFile

Create pfile= ' E:\backup\inittest.ora ' from SPFile;

------------------------------------

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.