Rman Recovery Case--recovery of all control files lost

Source: Internet
Author: User
Tags format exit log connect version thread backup
Recovery | Control 1.1. Loss of recovery 1.1.1 for all control files. Analog Control file loss
rman> shutdown abort;



Oracle routines are closed



Rman> host;



Microsoft Windows XP [version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.



C:\>del d:\oracle92\test1\control*. Ctl



C:\>dir d:\oracle92\test1\control*. Ctl

The volume in drive D is not labeled.

The serial number of the volume is 644d-03d9



D:\oracle92\test1 's Directory



File not found



C:\>exit

Host command complete



Rman>




1.1.2. Set Oracle_sid
Rman> exit;





Recovery manager complete.



C:\>

C:\>set Oracle_sid=test1



C:\>echo Oracle_sid

Oracle_sid



C:\>


1.1.3. Landing Rman
C:\>rman



Recovery Manager: Version 9.2.0.1.0-production



Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.



Rman> Connect Target Lunar/lunar@test1



Connected to target database (not started)



Rman> Connect Catalog Rman/rman@rman



Connecting to the Recovery directory database



Rman>


1.1.4. Set dbid in Rman
To let Rman know which database to look for SPFile

(dbid must be set in case of data shutdown)

Rman> Set dbid=910599446



Executing command: SET DBID



Rman>


1.1.5. To boot the database to the Nomount state
rman> startup Nomount;



Connected to target database (not started)

Oracle routines Started



System global Zone total 101784276 bytes



Fixed Size 453332 bytes

Variable Size 75497472 bytes

Database buffers 25165824 bytes

Redo buffers 667648 bytes



Rman>


1.1.6. Recovery control file 1.1.6.1. Using Recovery directory Recovery
If you use the recovery directory, you can simply perform the restore controlfile;

rman> restore Controlfile;



Start Restore in July-October-04



Allocated channel: Ora_disk_1

Channel Ora_disk_1:sid=13 Devtype=disk

Channel Ora_disk_1: Starting recovery of data file backup set

Channel ora_disk_1: Recovering control files

Output filename =d:\oracle92\test1\control01. Ctl

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\c-910599446-20041007-00 Tag=null params=null

Channel Ora_disk_1: Recovery complete

Copying control files

Output filename =d:\oracle92\test1\control01. Ctl

Output filename =d:\oracle92\test1\control02. Ctl

Output filename =d:\oracle92\test1\control03. Ctl

Completed restore in July-October-04



Rman>




1.1.6.2. Do not use Recovery directory recovery (control file recovery with automatic backup)
If the recovery directory is not used, the path recovery control file can be automatically backed up from the specified control file

Rman> run{

2> set controlfile autobackup format for device type disk

3> ' D:\RMANTEST\%F ';

4> restore controlfile from Autobackup;

5>}



Executing command: SET controlfile autobackup FORMAT



Start Restore in July-October-04



Allocated channel: Ora_disk_1

Channel Ora_disk_1:sid=13 Devtype=disk

Channel Ora_disk_1: Find automatic backups for the following dates: 20041007

Channel Ora_disk_1: Automatic backup found: D:\RMANTEST\c-910599446-20041007-00

Channel Ora_disk_1: Recovery from automatic backup control file completed

Copying control files

Output filename =d:\oracle92\test1\control01. Ctl

Output filename =d:\oracle92\test1\control02. Ctl

Output filename =d:\oracle92\test1\control03. Ctl

Completed restore in July-October-04



Rman> host;



Microsoft Windows XP [version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.



C:\>dir d:\oracle92\test1\control*. Ctl

The volume in drive D is not labeled.

The serial number of the volume is 644d-03d9



D:\oracle92\test1 's Directory



2004-10-07 15:18 1,630,208 CONTROL01. Ctl

2004-10-07 15:18 1,630,208 CONTROL02. Ctl

2004-10-07 15:18 1,630,208 CONTROL03. Ctl

3 Files 4,890,624 bytes

0 Directory 10,527,322,112 Free bytes



C:\>exit

Host command complete



Rman>


1.1.6.3. Extract control file 1.1.6.3.1. Extract control files from the recovery directory
When the database is open, you can extract the control file, as in the following example, extract the control file from the recovery directory and save it to D:\test_ctl.ora.

rman> restore Controlfile to ' d:\test_ctl.ora ';



Start Restore in July-October-04



Using channel Ora_disk_1

Channel Ora_disk_1: Starting recovery of data file backup set

Channel ora_disk_1: Recovering control files

Output filename =d:\test_ctl. ORA

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\c-910599446-20041007-00 Tag=null params=null

Channel Ora_disk_1: Recovery complete

Completed restore in July-October-04



Rman>


1.1.6.3.2. Extract control files from automatic backup control files
The following example is the d:\ of the control file from the automatic backup control file

Rman> run{

2> set controlfile autobackup format for device type disk

3> ' D:\RMANTEST\%F ';

4> restore Controlfile to ' d:\test_ctl.bak ' from autobackup;

5>}



Executing command: SET controlfile autobackup FORMAT



Start Restore in July-October-04



Using channel Ora_disk_1

Channel Ora_disk_1: Find automatic backups for the following dates: 20041007

Channel Ora_disk_1: Automatic backup found: D:\RMANTEST\c-910599446-20041007-00

Channel Ora_disk_1: Recovery from automatic backup control file completed

Completed restore in July-October-04



Rman>




1.1.7. Mount Database
Rman> ALTER DATABASE Mount;



The database is loaded



Rman>


1.1.8. Restore Database
rman> Recover database;



Started recover in July-October-04

Using channel Ora_disk_1



Beginning recovery of media



The archive log thread 1 sequence 16 has been D:\ORACLE92\TEST1\REDO03 as a file. LOG exists on disk

Archive log filename =d:\oracle92\test1\redo03. LOG Thread =1 sequence =16

Completion of media recovery

Completed recover in July-October-04



Rman>


1.1.9. Open resetlogs Database
rman> ALTER DATABASE open resetlogs;



Database is open

New entity of a database registered in the recovery directory

Starting resync for full recovery directory

Complete all Resync



Rman>


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.