Explore Oracle RMAN_07 recovery

Source: Internet
Author: User

The ultimate goal of backup is to better recover data and restore data. We have finished focusing on the previous chapter.RMANIn fact, we also talked about complex and complete recovery. Of course, in this section, we will discuss in detail the database recovery in several different situations.

1,Data File loss recovery

1.1InWwlCreate a tablespace5Table and add data.

SQL> create table wwl01 (id number (3), namevarchar2 (10 ));

Table created.

 

SQL> insert into wwl01 values (1, 'wwl ');

1 row created.

 

SQL> insert into wwl01 values (2, 'wm ');

1 row created.

 

SQL> insert into wwl01 values (3, 'zq ');

1 row created.

 

SQL> insert into wwl01 values (4, 'wbq ');

1 row created.

 

SQL> insert into wwl01 values (5, 'wq ');

1 row created.

 

SQL> create table wwl02 as select * from wwl01;

Table created.

 

SQL> create table wwl03 as select * from wwl01;

Table created.

 

SQL> create table wwl04 as select * from wwl01;

Table created.

 

SQL> create table wwl05 as select * from wwl01;

Table created.

 

View the data in the table:

SQL> select * from tab;

 

TNAME TABTYPE CLUSTERID

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

WWL01TABLE

WWL02TABLE

WWL03TABLE

WWL04TABLE

WWL05TABLE

 

1.2Perform full-Database Backup

[Oracle @ wwldb ~] $ Rman target/

Recovery Manager: Release 10.2.0.1.0-Production on Fri Jun 2200:59:59 2012

Copyright (c) 1982,200 5, Oracle. All rights reserved.

 

Connected to target database: WWL (DBID = 5520179)

 

RMAN> backup database;

 

1.3Simulate data loss and manually delete data filesWwl001.dbf

[Oracle @ wwldb WWL] $ rm-rfwwl001.dbf

 

1.4The database cannot be started again and an error is reported. The data file cannot be locked.5, ViewDbwr.

SQL> startup force;

ORACLEinstance started.

 

TotalSystem Global Area 285212672 bytes

FixedSize 1218968 bytes

VariableSize 92276328 bytes

DatabaseBuffers 184549376 bytes

RedoBuffers 7168000 bytes

Databasemounted.

ORA-01157: cannot identify/lock data file 5-see DBWR trace file

ORA-01110: data file 5: '/DBData/WWL/wwl001.dbf'

 

1.5Check the trace file and report the following error. The file cannot be found clearly:

Errors in file/DBSoft/admin/WWL/bdump/wwl_dbw0_29185.trc:

ORA-01157: Message 1157 not found; No message file for product = RDBMS, facility = ORA; arguments: [5]

ORA-01110: Message 1110 not found; No message file for product = RDBMS, facility = ORA; arguments: [5] [/DBData/WWL/wwl001.dbf]

ORA-27037: Message 27037 not found; No message file for product = RDBMS, facility = ORA

Linux Error: 2: No such file ordirectory

Additional information: 3

ORA-1157 signalled during: alterdatabase open...

From the above information, we can conclude that the database fault is caused by data files.Wwl001.dbfIf data files are lost or damaged due to database faults, the loss of data files will inevitably lead to the loss of database data. Fortunately, we have backed up the data before the loss, now let's use the previous backupWwl001.dbfWhen files are recovered, data files can be recovered in two ways: Online recovery without affecting other services of the database, and recovery of stopped services, for details, see: 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9 ..
  • 13
  • Next Page

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.