In volume El, only rman is fully standby, and conrol, redo, and data file recovery are lost.

Source: Internet
Author: User
Tags reserved oracle database

This article is a simulated test. The main steps are as follows:
1. Perform rman full backup for the Test Database (nocatalog mode)
2. Delete all files in the oradata \ orcl Directory
3. Use rman for recovery.

The detailed steps are as follows:
1. Perform rman full backup for the Test Database
C: \ Documents Ents and Settings \ xGss2000> rman nocatalog target/
Recovery Manager: Release 10.2.0.1.0-Production on Sunday, September 11, August 14 00:06:16 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect to the target database: ORCL (DBID = 1286878859)
Use the target database control file to replace the recovery Directory
RMAN> backup database;
Start backup from September 14 to September 11
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 158 devtype = DISK
Channel ORA_DISK_1: start all data file backup sets
Channel ORA_DISK_1: specifies the data file in the backup set.
Input data file fno = 00001 name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF
Input data file fno = 00003 name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF
Input data file fno = 00005 name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF
Input data file fno = 00002 name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF
Input data file fno = 00004 name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF
Channel ORA_DISK_1: Starting segment 1 from 14 to 11
Channel ORA_DISK_1: completed segment 1 from 14 to 11
Segment handle = D: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ BACKUPSET \ 20151108_14 \ tags tag = tag20151114t000703 annotation = NONE
Channel ORA_DISK_1: Backup set completed. Elapsed time: 00: 01: 35
Channel ORA_DISK_1: start all data file backup sets
Channel ORA_DISK_1: specifies the data file in the backup set.
The backup set includes the current control file
Include the current SPFILE in the backup set
Channel ORA_DISK_1: Starting segment 1 from 14 to 11
Channel ORA_DISK_1: completed segment 1 from 14 to 11
Segment handle = D: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ BACKUPSET \ 20151108_14 \ o1_mf_ncsnf_tag20151114t000703_74f8db55_.bkp flag = tag20151114t000703 annotation
Channel ORA_DISK_1: Backup set completed. Elapsed time: 00: 00: 03
Backup completed on September 14-11
2. Delete all files in the oradata \ orcl Directory
You must stop oracle before deleting it. Otherwise, you cannot delete the file.
C: \ Documents Ents and Settings \ xGss2000> sqlplus/as sysdba
SQL * Plus: Release 10.2.0.1.0-Production on Saturday August 13 23:27:24 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.

Delete all files in the orcl directory.
3. Use rman for recovery.
Because the control file is lost, the database can only be started to nomount.
SQL> startup nomount;
The ORACLE routine has been started.
Total System Global Area 171966464 bytes
Fixed Size 1247924 bytes
Variable Size 79693132 bytes
Database Buffers 88080384 bytes
Redo Buffers 2945024 bytes

Now, you need to restore the control file from the rman backup.
C: \ Documents Ents and Settings \ xGss2000> rman target/
Recovery Manager: Release 10.2.0.1.0-Production on Sunday, September 11, August 14 00:13:47 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect to the target database: orcl (not loaded)
RMAN> restore controlfile from 'd: \ oracle \ product \ 10.2.0 \ flash_recovery_area \ ORCL \ BACKUPSET \ 20151108_14 \ o2017mf_nnndf_tag20151114t000703_74f898to_.bkp ';
Start restore from 14-8-11
Use the target database control file to replace the recovery Directory
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 156 devtype = DISK
Channel ORA_DISK_1: restoring the control file
MAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: restore command (at 00:13:55 on 08/14/2011) failed
ORA-19697: backup control file not found in backup set
RMAN> restore controlfile from 'd: \ oracle \ product \ 10.2.0 \ flash_recovery_area \ ORCL \ BACKUPSET \ 20151108_14 \ o%mf_ncsnf_tag20151114t000703_74f8db55_.bkp ';
Start restore from 14-8-11
Use channel ORA_DISK_1
Channel ORA_DISK_1: restoring the control file
Channel ORA_DISK_1: Recovery completed, Time: 00:00:05
Output file name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ CONTROL01.CTL
Output file name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ CONTROL02.CTL
Output file name = D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ CONTROL03.CTL
Complete the restore from 14 to 11

Since the control file has been restored, we can now start the database to the mount state for the next recovery.
RMAN> alter database mount;
Database loaded
Released Channel: ORA_DISK_1
The command to restore the database is simple.
RMAN> restore database;
Start restore from 14-8-11
Start implicit crosscheck backup on September 14-11
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 155 devtype = DISK
Three objects that have been cross-checked
Implicit crosscheck backup completed on September 14-11
Start implicit crosscheck copy from 14 to 11
Use channel ORA_DISK_1
Implicit crosscheck copy completed on September 14-11
Search for all files in the recovery area
Compiling file directory...
Directory compilation completed
List of files included in the directory
======================================
File name: D: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ BACKUPSET \ 20151108_14 \ o1_mf_ncsnf_tag20151114t000703_74f8db55_.bkp
Use channel ORA_DISK_1
Channel ORA_DISK_1: Recovering data file backup set
Channel ORA_DISK_1: specifies the data file to be recovered from the backup set.
Restoring data file 00001 to D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF
Restoring data file 00002 to D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF
Restoring data file 00003 to D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF
Restoring data file 00004 to D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF
Restoring data file 00005 to D: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF
Channel ORA_DISK_1: Reading backup Segment D: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ BACKUPSET \ 20151108_14 \ o1_mf_nnndf_tag20151114t000703_74f898to_.bkp
Channel ORA_DISK_1: recovered backup segment 1
Segment handle = D: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ BACKUPSET \ 20151108_14 \ o1_mf_nnndf_tag20151114t000703_74f898to_.bkp Mark = tag201201714t000703
Channel ORA_DISK_1: Recovery completed, Time: 00:01:05
Complete the restore from 14 to 11
Recover database;
RMAN> recover database;
Start recover from 14-8-11
Use channel ORA_DISK_1
Restoring media...
The archived log cannot be found.
Archiving log thread = 1 sequence = 1
MAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: recover command (on 00:20:41) failed
RMAN-06054: Media recovery positive request unknown log: Thread 1 seq 1 lowscn 581729

Due to log loss, you can only open the database in restlogs mode.
RMAN> alter database open resetlogs;
Database opened

Since then, the database has been restored

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.