How to recover a database through Rman backup duplicate clone

Source: Internet
Author: User
Tags requires oracle database backup

Description

It was meant to be no. The target library creates Dataguard tests from the target library backup set, and discovery is not possible in principle, but it has a very useful feature that enables fast Rman backup and machine recovery.

Prior to the Rman backup from the machine recovery to operate a number of steps, through the Rman duplicate way to implement the database will be very fast. Another option will be provided for the future work of the whole library migration task.

This article records the complete process.

First, the environment introduction

1. Primary database environment

Operating system version: OEL5.8 x64

Database version: Oracle 11.2.0.3 x64

Database name: ORCL

Database SID:ORCL

Db_unique_name:orcl

Instance_name:orcl

ip:192.168.233.200

2. Prepare the Storehouse environment

Operating system version: OEL5.8 x64

Database version: Oracle 11.2.0.3 x64 (Oracle database software only installed, no NETCA DBCA)

Database name: ORCL

Database SID:ORCL

Db_unique_name:orcl

Instance_name:orcl

ip:192.168.233.150

Second, the primary database environment preparation

1. Target Library Environment

Re-create password file

# su-oracle

$ orapwd file= '/U01/APP/ORACLE/PRODUCT/11.2.0/DB_1/DBS/ORAPWORCL ' password=oracle entries=10 force=y

2. Lisener Listening files

$ cat/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

LISTENER =

(Description_list =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = 192.168.233.200) (PORT = 1521))

(address = (PROTOCOL = IPC) (KEY = EXTPROC1521))

)

)

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Global_dbname = ORCL)

(Oracle_home =/u01/app/oracle/product/11.2.0/db_1)

(Sid_name = ORCL)

)

)

Adr_base_listener =/u01/app/oracle

4. Tnsname.ora

Description: ORCL is the service name of the main library

$ cat/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

ORCL =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = 192.168.233.200) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = ORCL)

)

)

5. Rman back up the main library

Create an Rman backup directory

$ mkdir-p/u01/rman

Connect to target for backup

$ Rman Target/

Recovery manager: Release 11.2.0.3.0-production on Tuesday August 20 21:22:40 2013

Copyright (c) 1982, Oracle and/or its affiliates. All rights reserved.

More Wonderful content: http://www.bianceng.cn/database/Oracle/

Connected to target database: ORCL (dbid=1351765128)

rman> backup format '/u01/rman/fulldb_%d_%u ' database include current controlfile plus archivelog delete input;

Start Backup in 20月-August-13

The current log is archived

Replacing the recovery directory with the target database control file

Allocated channel: Ora_disk_1

Channel ora_disk_1:sid=1 Device Type =disk

Channel Ora_disk_1: Starting archive log backup set

Channel Ora_disk_1: The archive log in the backup set is being specified

Enter the archive log thread =1 sequence =6 recid=1 stamp=823986366

Enter the archive log thread =1 sequence =7 recid=2 stamp=823986369

Enter the archive log thread =1 sequence =8 recid=3 stamp=823987442

Channel Ora_disk_1: Starting segment 1 in 20月-August-13

Channel Ora_disk_1: Completed segment 1 in 20月-August-13

Segment handle =/u01/rman/fulldb_orcl_01ohq37j_1_1 mark =tag20130820t212403 annotation =none

Channel Ora_disk_1: Backup set completed, after time: 00:00:01

Channel Ora_disk_1: Deleting archive logs

RMAN-08137: Warning: Archive log is not deleted because the standby or upstream capture process requires it

Archive log file name =/u01/archivelog/arch_823984394_1_6.arc thread =1 sequence =6

RMAN-08137: Warning: Archive log is not deleted because the standby or upstream capture process requires it

Archive log file name =/u01/archivelog/arch_823984394_1_7.arc thread =1 sequence =7

RMAN-08137: Warning: Archive log is not deleted because the standby or upstream capture process requires it

Archive log file name =/u01/archivelog/arch_823984394_1_8.arc thread =1 sequence =8

Completed backup in 20月-August-13

Start Backup in 20月-August-13

Using channel Ora_disk_1

Channel Ora_disk_1: Starting all data file backup sets

Channel Ora_disk_1: Specifying Data files in Backup set

Enter data file: File Number = 00001 name =/u01/app/oracle/oradata/orcl/system01.dbf

Enter data file: File Number = 00002 name =/u01/app/oracle/oradata/orcl/sysaux01.dbf

Enter data file: File Number = 00003 name =/u01/app/oracle/oradata/orcl/undotbs01.dbf

Enter data file: File Number = 00004 name =/u01/app/oracle/oradata/orcl/users01.dbf

Channel Ora_disk_1: Starting segment 1 in 20月-August-13

Channel Ora_disk_1: Completed segment 1 in 20月-August-13

Segment handle =/u01/rman/fulldb_orcl_02ohq37l_1_1 mark =tag20130820t212405 annotation =none

Channel Ora_disk_1: Backup set completed, after time: 00:02:13

Channel Ora_disk_1: Starting all data file backup sets

Channel Ora_disk_1: Specifying Data files in Backup set

Include the current control file in the backup set

Include the current SPFILE in the backup set

Channel Ora_disk_1: Starting segment 1 in 20月-August-13

Channel Ora_disk_1: Completed segment 1 in 20月-August-13

Segment handle =/u01/rman/fulldb_orcl_03ohq3bq_1_1 mark =tag20130820t212405 annotation =none

Channel Ora_disk_1: Backup set completed, after time: 00:00:01

Completed backup in 20月-August-13

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.