1. Data Recovery guide:
Quickly detect, analyze, and repair faults
Minimizes downtime and run-time failures
Minimizes disruption to users
User interface:
--em GUI interface (multiple paths)
--rman command Line
Supported Database configurations:
--Single Instance
--Non-RAC
--Support for failover to the standby database, but does not support the analysis and repair of the standby database
Features of data recovery guidance:
Data recovery guidance automatically collects data failure information when an error occurs. In addition, it can proactively check for failures. In this mode, it is possible to detect and analyze data failures before the database process discovers the corruption and indicates the error (note that the fix is always controlled by the person).
Data failures can be severe. For example, if the most recent log file is missing, you cannot start the database. Some data failures, such as block corruption in data files, are not catastrophic failures because they do not cause the database to be down or prevent you from starting the Oracle instance.
Data recovery guidance can handle two situations where you cannot start the database (because some of the required database files are missing, or if the database files are inconsistent or corrupted), or when the runtime discovers that the file is corrupt.
2. Data Recovery guide: RMAN command line interface
RMAN command operation
List FAILURE list of previously performed failure evaluations
ADVISE FAILURE Display recommended repair options
REPAIR FAILURE Repair and shutdown failure (after the ADVISE command in the same RMAN session)
Change FAILURE changing or shutting down one or more failures
3. List data Failures
The RMAN list FAILURE command lists previously performed failure evaluations.
--including newly diagnosed faults
--Delete shutdown failure (by default)
LIST FAILURE
[All | CRITICAL | High | Low | CLOSED | Failnum[,failnum,...]]
[EXCLUDE FAILURE failnum[,failnum,...]] [DETAIL]
Rman> LIST FAILURE;
List of Database Failures
=========================
Failure ID Priority Status Time detected Summary
---------- -------- --------- ------------- -------
142 High OPEN 21-jun-07 one or more Non-system
Datafiles is missing
The RMAN list FAILURE command lists the failures. If the target instance uses the recovery directory, it can be in STARTED mode, otherwise it must be in mounted mode.
The list FAILURE command lists the results of previously performed evaluations. Repeat the LIST FAILURE command to re-verify any existing failures. If the database diagnoses a new failure (between command execution), these new failures are displayed. If the user manually fixes the failure or the temporary failure disappears, the data recovery guidance removes these failures from the list FAILURE output.
Learn more about the syntax:
Failnum: Shows the number of failures for the repair option.
All: Lists all priority failures.
CRITICAL: Lists faults for CRITICAL priority and open state. These failures need immediate attention because they make the entire database unusable.
High: Lists the high priority and the open state of the failure. These failures, such as the lack of archive redo logs, make the database part unusable or unrecoverable, so you should fix it as soon as possible.
Low: Lists the low priority and the open state of the fault. Low-priority failures can wait until more important failures are fixed before they are repaired.
CLOSED: Lists only the shutdown failures.
EXCLUDE FAILURE: Excludes the specified fault number from the list.
DETAIL: Expand the merge failure and list the fault details. For example, if more than one block in a file is damaged, the DETAIL option lists each block as corrupted.
4. Fix recommendations
RMAN ADVISE FAILURE Command:
--Syntax:
ADVISE FAILURE
[All | CRITICAL | High | Low | Failnum[,failnum,...]]
[EXCLUDE FAILURE Failnum [, Failnum,...]]
--Displays a summary of the input fault list (with warnings)
--Show Manual Check list
--Generate a repair script (for automatic or manual repair)
. . .
Repair Script:/u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2979128860.hm
Rman>
The RMAN ADVISE FAILURE command displays the repair options that are recommended for the specified failure. The ADVISE FAILURE command prints an input fault profile. This command implicitly closes any open failures that have been fixed.
The default behavior (when no options are used) is to provide recommendations for all failures that are recorded in the automatic diagnostics repository with priority CRITICAL and high. If a new failure has been recorded in the ADR since the last time the LIST FAILURE command was executed, the command will contain a WARNING before any CRITICAL and high failures are recommended.
Two general repair options are performed: No data loss repair and data loss repair.
Data recovery guidance a script is generated when the automatic repair option is generated to show how RMAN plans to fix the failure. If you do not want data recovery guidance to automatically fix the failure, you can start the manual repair from the script. The OS location of the script will be displayed at the end of the command output. You can examine this script and customize it (if necessary), and you can also execute the script manually (for example, when an audit trail requires manual action).
5. Perform the repair
RMAN REPAIR FAILURE Command:
--Executes after the ADVISE FAILURE command
--Fix specified faults
--Shut down the repaired fault
--Syntax:
REPAIR FAILURE
[PREVIEW]
[NoPrompt]
eg:rman> repair failure;
This command should be used after the ADVISE FAILURE command in the same RMAN session. By default (when no options are specified), this command uses one of the recommended repair options for the last execution of ADVISE FAILURE in the current session. If there are no repair options, the REPAIR FAILURE command launches the implicit ADVISE FAILURE command.
By default, you need to confirm that the command is executed because it may take time to complete a large number of changes. During a repair, the output of the command indicates the repair phase that is being performed.
When the repair is complete, the command turns off the failure.
Unable to run multiple concurrent repair sessions. However, you can run the concurrency REPAIR ... PREVIEW session.
PREVIEW: Instead of performing the fix, it displays the RMAN script that was previously generated that contains all the repair actions and comments.
NoPrompt: no confirmation required.
6. Classification (and shutdown) failures
RMAN Change FAILURE command:
--Change the fault priority (except CRITICAL)
--Shut down one or more faults
Rman> Change failure 5 priority low;
List of Database Failures
=========================
Failure ID Priority Status Time detected Summary
---------- -------- --------- ------------- -------
5 High OPEN 20-dec-06 One or more datafiles is missing
Do you really want to change the above failures (enter YES or NO)? Yes
Changed 1 failures to low priority
This command is used to change the fault priority or to shut down one or more failures.
Grammar:
Change FAILURE
{All | CRITICAL | High | Low | Failnum[,failnum,...]}
[EXCLUDE FAILURE failnum[,failnum,...]]
{Priority {CRITICAL | High | Low} |
Close}--Change the state of the failure to close
[NoPrompt]--No user confirmation required
You can change the fault priority from high to low, and from low to high. An error occurred while changing the CRITICAL priority level. (One reason to change the priority of a failure from high to low is to prevent the failure from appearing in the default output list of the list FAILURE command.) For example, if a damaged block has a high priority and the block is in a table space that is rarely used, you may want to temporarily change it to low. )
After the failure is repaired, the open failure is closed implicitly. However, you can also explicitly turn off the failure. This requires a reassessment of all other open failures, because some of these failures become irrelevant due to the shutdown of this failure.
By default, this command requires the user to confirm the requested change.
7. Data Recovery Guide View
To query the Dynamic Data dictionary view:
V$ir_failure: Lists all failures, including closed failures (results of the list FAILURE command)
V$ir_manual_checklist: List Manual suggestions (results of ADVISE FAILURE command)
V$ir_repair: List fixes (results of ADVISE FAILURE command)
V$ir_failure_set: Cross-reference faults and suggested identifiers
Use example: Assume that you need to display all faults detected on June 21, 2007.
SELECT * from V$ir_failure
WHERE trunc (time_detected) = ' 21-jun-2007 ';
(Adjust the output format according to the page)
failure_id parent_id child_count class_name time_dete MODIFIED DESCRIPTION impacts Priority STATUS
142 0 0 Persistent_data 21-jun-07 21-jun-07 one or more Non-system datafiles is missing see Impac T for individual child failures high CLOSED
145 142 0 Persistent_data 21-jun-07 21-jun-07 datafile 4: '/u01/app/oracle/oradata/orcl/use RS01.DBF ' is missing
Some objects in Tablespace USERS might is unavailable high CLOSED
151 142 0 Persistent_data 21-jun-07 21-jun-07 datafile 5: '/u01/app/oracle/oradata/orcl/example01. DBF ' is missing
Some objects in Tablespace EXAMPLE might being unavailable high CLOSED
Oracle Data Recovery Guidance detailed