2018年我已经33岁了,不能在荒废下去,一定要好好学习!
数据恢复顾问 DRA
SQL> startup
ORACLE instance started.
Total System Global Area 776646656 bytes
Fixed Size 2217384 bytes
Variable Size 515902040 bytes
Database Buffers 255852544 bytes
Redo Buffers 2674688 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/u01/app/oradata/milan01/sysaux01.dbf'
RMAN> list failure;
using target database control file instead of recovery catalog
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
42 HIGH OPEN 20-NOV-17 One or more non-system datafiles are missing
1522 HIGH OPEN 26-OCT-17 One or more non-system datafiles are offline
RMAN> change failure 42 priority low;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
42 HIGH OPEN 20-NOV-17 One or more non-system datafiles are missing
Do you really want to change the above failures (enter YES or NO)? y
changed 1 failures to LOW priority
RMAN> list failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
1522 HIGH OPEN 26-OCT-17 One or more non-system datafiles are offline
RMAN> change failure 42 priority high;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
42 LOW OPEN 20-NOV-17 One or more non-system datafiles are missing
Do you really want to change the above failures (enter YES or NO)? y
changed 1 failures to HIGH priority
RMAN> list failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
42 HIGH OPEN 20-NOV-17 One or more non-system datafiles are missing
1522 HIGH OPEN 26-OCT-17 One or more non-system datafiles are offline
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
42 HIGH OPEN 20-NOV-17 One or more non-system datafiles are missing
1522 HIGH OPEN 26-OCT-17 One or more non-system datafiles are offline
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /u01/app/oradata/milan01/sysaux01.dbf was unintentionally renamed or moved, restore it
2. An automatic repair was generated for some of the failures selected for repair. A database state change
is required to repair the following failures.3. Open the database to validate and get repair advice for failure 1851: Datafile 6: '/u01/app/oracle/dbs/MI
SSING00006' is offline
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 2
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/diag/rdbms/milan01/milan01/hm/reco_624028878.hm
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/diag/rdbms/milan01/milan01/hm/reco_624028878.hm
contents of repair script:
# restore and recover datafile
restore datafile 2;
recover datafile 2;
Do you really want to execute the above repair (enter YES or NO)? y
executing repair script
Starting restore at 20-NOV-17
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 00002 to /u01/app/oradata/milan01/sysaux01.dbf
channel ORA_DISK_1: reading from backup piece /u01/MILAN01_9.bak
channel ORA_DISK_1: piece handle=/u01/MILAN01_9.bak tag=TAG20171120T045459
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 20-NOV-17
Starting recover at 20-NOV-17
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 20-NOV-17
repair failure complete
1)先 list failure,然后再 advise failure.次序不能错,修复问题的顺序是 list,advise,repair
2)所有启动模式下都可以使用 DRA, nomount 下修复控制文件, mount 或 open 下修复数据文
件。
3)DRA 目前只能在单实例下运行, RAC 不可以使用它