Rman Recovery Case--all data files are lost

Source: Internet
Author: User
Tags log variable thread backup
Recovery | Data 1.1. Loss of all data files
The major premise is that control files and log files are not corrupted.
1.1.1. Simulate loss of all data files
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\*.dbf



C:\>exit

Host command complete



Rman>


1.1.2. Mount Database
rman> startup Mount;



Connected to target database (not started)

Oracle routines Started

The database is loaded



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.3. Restoring database (Restore)
rman> Restore Database;



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: Specifying a data file to recover from a backup set

Restoring data file 00002 to D:\ORACLE92\ORADATA\TEST1\UNDOTBS01. Dbf

Restoring data file 00003 to D:\ORACLE92\ORADATA\TEST1\INDX01. Dbf

Restoring data file 00004 to D:\ORACLE92\ORADATA\TEST1\USERS01. Dbf

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\full01g1v3r8_1_1 tag=hot_db_bk_level0 params=null

Channel Ora_disk_1: Recovery complete

Channel Ora_disk_1: Starting recovery of data file backup set

Channel Ora_disk_1: Specifying a data file to recover from a backup set

Restoring data file 00001 to D:\ORACLE92\ORADATA\TEST1 YSTEM01. Dbf

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\full02g1v3ro_2_1 tag=hot_db_bk_level0 params=null

Channel Ora_disk_1: Recovery complete

Completed restore in July-October-04



Rman>


1.1.4. Recovery Database (recovery)
rman> Recover database;



Started recover in July-October-04

Using channel Ora_disk_1



Beginning recovery of media

Completion of media recovery



Completed recover in July-October-04



Rman>


1.1.5. Open Database
rman> ALTER DATABASE open;



Database is open



Rman>




1.2. Loss of all data files, control files and online log file 1.2.1. Simulate loss of all data files, control files, online log files
rman> shutdown abort;



Oracle routines are closed



Manually delete all missing data files, control files, online log files.




1.2.2. Nomount Database
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.2.3. Restore Control files
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\oradata\test1\control01. Ctl

Channel Ora_disk_1: restored backup Segment 1

Segment HANDLE=D:\RMANTEST\CTL538939298_S4_P1. CTL tag=tag20041007t172138 Params=null

Channel Ora_disk_1: Recovery complete

Copying control files

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

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

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

Completed restore in July-October-04



Rman>


1.2.4. Restore all data files
rman> Restore Database;



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: Specifying a data file to recover from a backup set

Restoring data file 00002 to D:\ORACLE92\ORADATA\TEST1\UNDOTBS01. Dbf

Restoring data file 00003 to D:\ORACLE92\ORADATA\TEST1\INDX01. Dbf

Restoring data file 00004 to D:\ORACLE92\ORADATA\TEST1\USERS01. Dbf

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\full01g1v3r8_1_1 tag=hot_db_bk_level0 params=null

Channel Ora_disk_1: Recovery complete

Channel Ora_disk_1: Starting recovery of data file backup set

Channel Ora_disk_1: Specifying a data file to recover from a backup set

Restoring data file 00001 to D:\ORACLE92\ORADATA\TEST1 YSTEM01. Dbf

Channel Ora_disk_1: restored backup Segment 1

Duan Handle=d:\rmantest\full02g1v3ro_2_1 tag=hot_db_bk_level0 params=null

Channel Ora_disk_1: Recovery complete

Completed restore in July-October-04



Rman>




1.2.5. Mount Database
Rman> ALTER DATABASE Mount;



The database is loaded



Rman>


1.2.6. Recovery database (SCN based recovery)
rman> recover database until SCN 71028;



Started recover in July-October-04

Using channel Ora_disk_1



Beginning recovery of media



The archive log thread 1 sequence 3 has been D:\ORACLE92\ADMIN\TEST1\ARCH\ARC00003 as a file. ARCH exists on disk

The archive log thread 1 sequence 4 has been D:\ORACLE92\ADMIN\TEST1\ARCH\ARC00004 as a file. ARCH exists on disk

Archive log filename =d:\oracle92\admin\test1\arch\arc00003. ARCH Thread =1 sequence =3

Archive log filename =d:\oracle92\admin\test1\arch\arc00004. ARCH Thread =1 sequence =4

Completion of media recovery

Completed recover in July-October-04



Rman>


1.2.7. To recover a database using the Resetlogs option
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.