11g RMAN REPAIR ADVISOR

USING RMAN REPAIR ADVISOR:

Export ORACLE_SID=test1

sqlplus “sys as sysdba”

Shutdown immediate.

Go to c:\app\bb16872\test1 and rename SYSTEM01.DBF to SYSTEM01.old

Next try to startup database…will fail with error that SYSTEM01.DBF is missing.

Y:\>rman target /

Recovery Manager: Release 11.1.0.6.0 – Production on Wed Apr 30 10:51:03 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: TEST1 (DBID=1030433487, not open)

RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================

Failure ID Priority Status Time Detected Summary
———- ——– ——— ————- ——-
122 CRITICAL OPEN 30-APR-08 System datafile 1: ‘C:\APP\BB16872\T
EST1\SYSTEM01.DBF’ is missing

RMAN> list failure detail;
List of Database Failures
=========================

Failure ID Priority Status Time Detected Summary
———- ——– ——— ————- ——-
122 CRITICAL OPEN 30-APR-08
System datafile 1: ‘C:\APP\BB16872\TEST1\SYSTEM01.DBF’ is missing
Impact: Database cannot be opened

RMAN>

RMAN> advise failure;
List of Database Failures
=========================

Failure ID Priority Status Time Detected Summary
———- ——– ——— ————- ——-
122 CRITICAL OPEN 30-APR-08
System datafile 1: ‘C:\APP\BB16872\TEST1\SYSTEM01.DBF’ is missing
Impact: Database cannot be opened

analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
analyzing automatic repair options complete

Mandatory Manual Actions
========================
no manual actions available

Optional Manual Actions
=======================
1. If file C:\APP\BB16872\TEST1\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: c:\app\bb16872\diag\rdbms\test1\test1\hm\reco_971996631.hm

RMAN> repair failure preview;

Strategy: The repair includes complete media recovery with no data loss
Repair script: c:\app\bb16872\diag\rdbms\test1\test1\hm\reco_971996631.hm

contents of repair script:
# restore and recover datafile
restore datafile 1;
recover datafile 1;

RMAN> repair failure noprompt;
Strategy: The repair includes complete media recovery with no data loss
Repair script: c:\app\bb16872\diag\rdbms\test1\test1\hm\reco_971996631.hm

contents of repair script:
# restore and recover datafile
restore datafile 1;
recover datafile 1;

executing repair script

Starting restore at 30-APR-08
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 00001 to C:\APP\BB16872\TEST1\SYSTEM01.DB
F
channel ORA_DISK_1: reading from backup piece C:\APP\BB16872\BACKUP\1_TEST1_6533
95264
channel ORA_DISK_1: piece handle=C:\APP\BB16872\BACKUP\1_TEST1_653395264 tag=TAG
20080430T104104
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:45
Finished restore at 30-APR-08

Starting recover at 30-APR-08
using channel ORA_DISK_1

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

Finished recover at 30-APR-08
repair failure complete

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

In case of loss of controlfile….
Follow same steps above –remove controlfile and then try to startup.

RMAN> repair failure noprompt;

Strategy: The repair includes complete media recovery with no data loss
Repair script: c:\app\bb16872\diag\rdbms\test1\test1\hm\reco_3514023340.hm

contents of repair script:
# restore control file using multiplexed copy
restore controlfile from ‘C:\APP\BB16872\TEST1\CONTROL03.CTL’;
sql ‘alter database mount’;
executing repair script

Starting restore at 30-APR-08
using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy
output file name=C:\APP\BB16872\TEST1\CONTROL01.CTL
output file name=C:\APP\BB16872\TEST1\CONTROL02.CTL
output file name=C:\APP\BB16872\TEST1\CONTROL03.CTL
Finished restore at 30-APR-08

sql statement: alter database mount
released channel: ORA_DISK_1
repair failure complete
database opened

RMAN> exit

Recovery Manager complete.

Y:\>sqlplus “sys as sysdba”

SQL*Plus: Release 11.1.0.6.0 – Production on Wed Apr 30 11:17:04 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select file_name from dba_Data_Files;
FILE_NAME
——————————————————————————–

C:\APP\BB16872\TEST1\SYSTEM01.DBF
C:\APP\BB16872\TEST1\SYSAUX01.DBF
C:\APP\BB16872\TEST1\UNDOTBS01.DBF
C:\APP\BB16872\TEST1\USERS01.DBF

SQL>

The following two tabs change content below.

Arjun Raja

Latest posts by Arjun Raja (see all)

Updated on June 2, 2021

Was this article helpful?

Related Articles

Comments

  1. these command is not working on standbay and rac enviroment
    please tell me for these enviroment

    rman>list failure —-these commands give error

    RMAN> list failure;

    using target database control file instead of recovery catalog
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 02/12/2011 16:05:09
    RMAN-05533: LIST FAILURE is not supported on STANDBY database

Leave a Comment