Header

Saturday, January 13, 2018

Data Recovery Advisor

The Data Recovery Advisor tool was
added to RMAN in Oracle Database 11g.This tool automatically detects
problems with your database that may require you to perform restore and
recovery operations. The Data Recovery Advisor will list failures, give you
advice on how to resolve issues, and allow you to push the button that
instructs RMAN to run the commands required to fix the problem.

The prior output indicates that the
database has at least one data file that is missing. At this point you should
next run the advise failure. To get more details on this failure:-

RMAN> list failure 52 detail;

The Data Recovery Advisor stores its
information outside the database in the Automatic Diagnostic Repository (ADR). This allows you to run the list
failure command even when your database is started in nomount mode and is also not dependent on the
availability of the recovery catalog (if using one). You can determine the
location of the base directory for the ADR by viewing
the diagnostic_dest initialization parameter.

If you suspect there is a problem with
your database and the Data Recovery Advisor is not reporting a failure, you can proactively initiate a database
health check by running the following RMAN command:

RMAN> validate database;

If you want to see all failures that
have been resolved and closed, then use the closed clause:

RMAN> list failure closed;

Advise Failure

You’ve experienced a media failure.
You want to get advice from the Data Recovery Advisor about how to restore and recover your database.

RMAN> advise failure;

OR

RMAN> advise failure 52;

Depending on your situation, the advise
failure output will contain one or both of the following sections:

Manual Checklist

Automated Repair Options

The Manual Checklist section gives you
advice for manually resolving the issue.

The Automated Repair Options section
will list the location and name of a repair script that contains RMAN commands to resolve the problem. At
this point, you may want to open another terminal session and inspect the contents of the repair script (with a
text editor such as vi or Notepad).

By analyzing the script you can gain a
greater understanding of the failure and how RMAN intends to resolve the problem. If you want RMAN to
automatically repair the failure, then run the repair failure.

Repair Failure

By running list failure and advise
failure, you will gain an understanding as to what the problem is and how to fix it. You can use the repair
failure command to run the repair script generated by the Data Recovery Advisor:

RMAN> repair failure;

It’s recommend that you run the repair
failure command only after you have run the list failure and advise failure commands. Repairing the
problem should be the last step performed. You should use the Data Recovery Advisor to repair failures only after
you thoroughly understand what the failure is and what commands will be run to repair the failure.

If you want to inspect what the repair
failure command will do without running the commands, then use the preview clause: