An introduction to the recovery of Rman backup set in Oracle Archive mode in different machine

Source: Internet
Author: User
Tags ftp mkdir backup

Environment:

Os:red Hat Linux as 5

db:10.2.0.4

There are times when the test environment requires that we use the backup set of the production library to recover on another new machine (provided the new machine installs Oracle software in advance and the version is consistent with the original library), and the following is the recovery process.

1. Make full preparation on original library (operate on original library)

run{

Allocate channel C1 device type disk;

Allocate channel C2 device type disk;

Backup format '/u02/rman_backup/full_backup/full_backup_%t_%s ' database;

SQL ' alter system archive log current ';

Backup format '/u02/rman_backup/full_backup/arc_backup_%t_%s ' Archivelog all;

Release channel C1;

Release channel C2;

}

2. View the original library's dbid (operation on the original library)

Because of the need to set dbid in the process of recovery, we need to find Yuanku dbid

Sql> select dbid from V$database;

DBID

----------

1820932955

-----The following actions have no special instructions, all operate on the destination library-----

3. Use FTP to copy the backup set on the original library to the directory/u02/ftp/of the destination library (specific operation omitted)

4. Create the following directory on the new machine

Mkdir/u02/mydb

Mkdir-p/u02/mydb/oracl/{adump,bdump,cdump,dpdump,udump,pfile}

Mkdir-p/u02/mydb/oradata/oracl

Mkdir-p/u02/mydb/flash_recovery_area

5. Create a password file

Orapwd File=/u01/app/oracle/product/10.2.0/db_1/dbs/orapworacl.ora password=oracle

6. Recovery parameter file

[Oracle@hxlbak ~]$ Rman Target/

Recovery manager:release 10.2.0.1.0-production on Fri June 29 06:51:54 2012

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

Connected to target database (not started)

Rman>set dbid 1820932955--this dbid needs to be consistent with the original library.

Rman> Startup Nomount

This article URL address: http://www.bianceng.cn/database/Oracle/201410/45468.htm

Startup failed:ora-01078:failure in processing system parameters

Lrm-00109:could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initoracl.ora '

Starting Oracle instance without parameter file for Retrival of SPFile

Oracle instance started

Total System Global area 159383552 bytes

Fixed Size 1218268 bytes

Variable Size 54528292 bytes

Database buffers 100663296 bytes

Redo buffers 2973696 bytes

rman> restore SPFile to Pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initoracl.ora ' from '/u02/ftp/full_backup_ 20120628_37 ';

Starting restore at 29-jun-12

Using target database control file instead of recovery catalog

Allocated Channel:ora_disk_1

Channel ora_disk_1:sid=36 Devtype=disk

Channel Ora_disk_1:autobackup found:/u02/ftp/full_backup_20120628_37

Channel Ora_disk_1:spfile Restore from Autobackup complete

Finished restore at 29-jun-12

Backup set Full_backup_20120628_3 7 contains the parameter file, we will back up the data by default backup parameter file, you can use list backup in the original library view, the list backup output part of the following:

BS Key Type LV Size Device Type Elapsed Time Completion time

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

Full 80.00K DISK 00:00:01 28-jun-12

BP key:35 status:available Compressed:no tag:tag20120628t184555

Piece Name:/u02/rman_backup/full_backup/full_backup_20120628_37

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.