Data Recovery Advisor feature helps in diagnosing and repairing data failures. It will automatically diagnose the issue and provides the recommendation for the repair that helps to resolve the data failure quickly.

The Data Recovery Advisor can diagnose and repair a range of data failures that includes (Corrupted blocks, missing datafiles, Control file failures, missing archived redo logs).

 

Connect to rman client:

[oracle@reyno ~]$ rman target/

Recovery Manager: Release 19.0.0.0.0 – Production on Tue Feb 7 10:02:56 2023

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: REYNALDO (DBID=1338893540, not open)

 

List failure: 

  • Lists the failures in the database.

RMAN> list failure;

using target database control file instead of recovery catalog

Database Role: PRIMARY

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

———- ——– ——— ————- ——-

842        HIGH     OPEN      07-FEB-23     One or more non-system datafiles are missing

 

Advise failure: 

  • Provides the necessary action for repairing the failures.

RMAN> advise failure;

Database Role: PRIMARY

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

———- ——– ——— ————- ——-

842        HIGH     OPEN      07-FEB-23     One or more non-system datafiles are missing

analyzing automatic repair options; this may take some time

using channel ORA_DISK_1

analyzing automatic repair options complete

Mandatory Manual Actions

========================

no manual actions available

Optional Manual Actions

=======================

  1. If file /u01/app/oracle/oradata/REYNALDO/datafile/o1_mf_users_kwd0s1wc_.dbf was unintentionally renamed or moved, restore it

Automated Repair Options

========================

Option Repair Description

————————

1      Restore and recover datafile 7

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/reynaldo/reynaldo/hm/reco_1469010506.hm

 

Repair failure preview:

  • Shows the content of the script to repair the failure.

RMAN> repair failure preview;

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/reynaldo/reynaldo/hm/reco_1469010506.hm

contents of repair script:

   # restore and recover datafile

   restore ( datafile 7 );

   recover datafile 7;

   sql ‘alter database datafile 7 online’;

 

Repair failure:

  • Executes the script to repair the failure.

RMAN> repair failure;

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/reynaldo/reynaldo/hm/reco_1469010506.hm

contents of repair script:

# restore and recover datafile

restore ( datafile 7 );

recover datafile 7;

sql ‘alter database datafile 7 online’;

 

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

executing repair script

Starting restore at 07-FEB-23

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/REYNALDO/datafile/o1_mf_users_kwd0s1wc_.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/REYNALDO/backupset/2023_02_07/o1_mf_nnndf_TAG20230207T095014_ky3ncym6_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/REYNALDO/backupset/2023_02_07/o1_mf_nnndf_TAG20230207T095014_ky3ncym6_.bkp tag=TAG20230207T095014

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 07-FEB-23

Starting recover at 07-FEB-23

using channel ORA_DISK_1

starting media recovery

media recovery complete, elapsed time: 00:00:00

Finished recover at 07-FEB-23

sql statement: alter database datafile 7 online

repair failure complete

Do you want to open the database (enter YES or NO)? YES

database opened

Recent Posts

Start typing and press Enter to search