Oracle data recovery consultant (DRA) use test

Source: Internet
Author: User
Learn how Oracle Data Recovery Advisor (DRA) helps us in this situation! Data recovery consultant (DataRecoveryAdvisor) is an Oracle Database Engineer

Learn how Oracle Data Recovery Advisor (DRA) helps us in this situation! Data Recovery Advisor is an Oracle Database Engineer.

Have you ever handled the problem of data corruption or data loss on the hard disk? As a result, even though you are still in the process of diagnosing and analyzing the problem, the end user and manager have already contacted you and want to know the approximate time (ETA) for solving the problem. Do you want to have a simple and more important way to quickly diagnose and fix such faults?

Continue to read about how Oracle Data Recovery Advisor (DRA) helps us in this situation!

Data Recovery Advisor is an Oracle database tool. The tool automatically diagnoses data faults, determines and proposes corresponding repair solutions, and carries out customer-requested repairs. The above repair is based on data failure, which is the damage or loss of persistent data on a hard disk.

The data recovery consultant will automatically collect data fault information when encountering problems and assist in fault repair. You can manually repair a data fault or ask the data recovery consultant to perform the repair action for you.

DRA can be accessed through Enterprise Manager (EM) Grid Control and/or recovery Manager (RMAN. This document describes the commands used in RMAN.

In RMAN, there are four commands for DRA:
• List Failure-List fault assessment results that have been previously performed. If possible, re-verify existing faults and disable them.
• Advise Failure-proposed manual and automatic repair solutions.
• Repair Failure-automatically repairs faults by running the best Repair solution recommended by advise failure. After completion, the system will re-verify the existing fault.
• Change Failure-enables you to Change the fault status.

For example, the following steps involve an accident. When a data file has been deleted from the operating system, the database reports an error.

If a select statement fails to be executed, the following error is returned:
SQL> select * from emp;
Select * from emp
*
ERROR at line 1:
ORA-01116: error in opening database file 4
ORA-01110: data file 4: '/u01/v1__oradata/users01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3

The DRA command 'list failure' provides detailed information about this issue:
Recovery Manager: Release 11.2.0.3.0-Production on Wed Aug 21 10:12:36 2013
Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.

Connected to target database: V112 (DBID = 2335388877)

RMAN> list failure;

Using target database control file instead of recovery catalog
List of Database Failures
======================================
Failure ID Priority Status Time Detected Summary
--------------------------------------------------------------------------------
82 high open 21-AUG-13 One or more non-system datafiles are missing

As the next operation of DRA, run the 'advise failure 'command to obtain the recommended solution to fix the problem:

RMAN> advise failure;

List of Database Failures
======================================

Failure ID Priority Status Time Detected Summary
-----------------------------------------------
82 high open 21-AUG-13 One or more non-system datafiles are missing

Analyzing automatic repair options; this may take some time
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 28 device type = DISK
Analyzing automatic repair options complete

Mandatory Manual Actions
======================================
No manual actions available

Optional Manual Actions
======================================
1. If file/u01/v1__oradata/users01.dbf was unintentionally renamed or moved, restore it
2. If file/u01/v1__oradata/test01.dbf was unintentionally renamed or moved, restore it

Automatic Repair Options
======================================
Option Repair Description
------------------------
1 Restore and recover datafile 4; Restore and recover datafile 5
Strategy: The repair complete media recovery with no data loss
Repair script:/u02/app/oracle/diag/rdbms/v112/V112/hm/reco_1311249797.hm

The DRA information describes the two missing data files, which are recommended for restoration and recovery.

As mentioned above, DRA can repair faults. You can preview the recommended command before executing the fix script:

RMAN> repair failure preview;

Strategy: The repair complete media recovery with no data loss
Repair script:/u02/app/oracle/diag/rdbms/v112/V112/hm/reco_1311249797.hm

Contents of repair script:
# Restore and recover datafile
SQL 'alter database datafile 4, 5 offline ';
Restore datafile 4, 5;
Recover datafile 4, 5;
SQL 'alter database datafile 4, 5 online ';

Now, you can decide whether to manually run the above script or let DRA execute the fix:

RMAN> repair failure;

Strategy: The repair complete media recovery with no data loss
Repair script:/u02/app/oracle/diag/rdbms/v112/V112/hm/reco_1311249797.hm

Contents of repair script:
# Restore and recover datafile
SQL 'alter database datafile 4, 5 offline ';
Restore datafile 4, 5;
Recover datafile 4, 5;
SQL 'alter database datafile 4, 5 online ';

Do you really want to execute the above repair (enter YES or NO )? Yes
Executing repair script

SQL statement: alter database datafile 4, 5 offline

Starting restore at 21-AUG-13
Using channel ORA_DISK_1

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.