Database Reference
In-Depth Information
Here is a snippet of the output for this particular issue:
Optional Manual Actions
=======================
1. If file /u01/dbfile/O12C/system01.dbf was unintentionally renamed or moved,
restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 1
Strategy: The repair includes complete media recovery with no data loss
Repair script: /ora01/app/oracle/diag/rdbms/O12C/O12C/hm/reco_4116328280.hm
In this case, the Data Recovery Advisor created a script that can be used to potentially fix the problem. The
contents of the repair script can be viewed with an OS utility; for example,
$ cat /ora01/app/oracle/diag/rdbms/O12C/O12C/hm/reco_4116328280.hm
Here are the contents of the script for this example:
# restore and recover datafile
restore ( datafile 1 );
recover datafile 1;
sql 'alter database datafile 1 online';
After reviewing the script, you can decide to run the suggested commands manually, or you can have the Data
Recovery Advisor run the script via the
REPAIR
command (see the next section for details).
Repairing Failures
If you have identified a failure and viewed the recommended advice, you can proceed to the repair work. If you want
to inspect what the
REPAIR FAILURE
command will do without actually running the commands, use the
PREVIEW
clause:
RMAN> repair failure preview;
Before you run the
REPAIR FAILURE
command, ensure that you first run the
LIST FAILURE
and
ADVISE FAILURE
commands from the same connected session. In other words, the RMAN session that you're in must run the
LIST
and
ADVISE
commands within the same session before running the
REPAIR
command.
If you're satisfied with the repair suggestions, then run the
REPAIR FAILURE
command:
RMAN> repair failure;
You'll be prompted at this point for confirmation:
Do you really want to execute the above repair (enter YES or NO)?