oracle将advisor引入了rman,这样对rman来讲, 变的更加简单、人性化。这个功能跟11G的ADR框架是分不开的.如果要了解什么是ADR,那么首先要了解什么是FDI (Fault Diagnosability Infrastructure).FDI架构是11G引入的一个新的数据库诊断框架.Data Recovery Advisor是FDI的一部分,专门用来管理跟数据库恢复有关的一切的事务.DRA的主要任务是记录并分析oracle data validate的结果, 找出其中的问题,并给出相应的解决方案. DBA只要根据DRA的流程就可以轻松完成数据库的修复,记录下测试过程:
- 执行database validate
[ora11@dbtest datafile]$ /oracle/product/11.1/bin/rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Fri Oct 30 12:59:43 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: NEWORA (DBID=3194836416)
RMAN>;
RMAN>; backup validate check logical database;
Starting backup at 30-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=124 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/datavg1/newora/NEWORA/datafile/o1_mf_sysaux_53k8v6sn_.dbf
input datafile file number=00001 name=/datavg1/newora/NEWORA/datafile/o1_mf_system_53k8v6s8_.dbf
input datafile file number=00003 name=/datavg1/newora/NEWORA/datafile/o1_mf_undotbs1_53k8v7dg_.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/30/2009 13:00:17
ORA-01122: database file 4 failed verification check
ORA-01110: data file 4: '/datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf'
ORA-01565: error in identifying file '/datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE OK 0 2
Control File OK 0 594
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/30/2009 13:00:17
ORA-01122: database file 4 failed verification check
ORA-01110: data file 4: '/datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf'
ORA-01565: error in identifying file '/datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
oracle在数据validate过程中发现datafile 4有问题.这时orace上述的结果记录到ADR.
- DRA(Data Recovery Advisor)闪亮登场
显示failure信息
RMAN> list failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
342 HIGH OPEN 30-OCT-09 One or more non-system datafiles are corrupt
显示更加详细的failure信息
RMAN> list failure 342 detail;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
342 HIGH OPEN 30-OCT-09 One or more non-system datafiles are corrupt
Impact: See impact for individual child failures
List of child failures for parent failure ID 342
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
345 HIGH OPEN 30-OCT-09 Datafile 4: '/datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf' is corrupt
Impact: Some objects in tablespace USERS might be unavailable
DRA给出修复意见
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
342 HIGH OPEN 30-OCT-09 One or more non-system datafiles are corrupt
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
=======================
no manual actions available
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 4
Strategy: The repair includes complete media recovery with no data loss
Repair script: /oracle/product/diag/rdbms/newora/newora/hm/reco_2753053309.hm
可以让DRA来修复错误,也可以自己手动修复.这里让DRA来自动修复:
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /oracle/product/diag/rdbms/newora/newora/hm/reco_2753053309.hm
contents of repair script:
# restore and recover datafile
sql 'alter database datafile 4 offline';
restore datafile 4;
recover datafile 4;
sql 'alter database datafile 4 online';
Do you really want to execute the above repair (enter YES or NO)? yes
executing repair script
sql statement: alter database datafile 4 offline
Starting restore at 30-OCT-09
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 00004 to /datavg1/newora/NEWORA/datafile/o1_mf_users_5gnthzb5_.dbf
channel ORA_DISK_1: reading from backup piece /nas_temp/newora.3.701358147.rman
channel ORA_DISK_1: piece handle=/nas_temp/newora.3.701358147.rman tag=TAG20091027T133658
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 30-OCT-09
Starting recover at 30-OCT-09
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 102 is already on disk as file /datavg1/newora/1_102_689789186.dbf
archived log for thread 1 with sequence 103 is already on disk as file /datavg1/newora/1_103_689789186.dbf
archived log for thread 1 with sequence 104 is already on disk as file /datavg1/newora/1_104_689789186.dbf
archived log for thread 1 with sequence 105 is already on disk as file /datavg1/newora/1_105_689789186.dbf
archived log for thread 1 with sequence 106 is already on disk as file /datavg1/newora/1_106_689789186.dbf
archived log file name=/datavg1/newora/1_102_689789186.dbf thread=1 sequence=102
archived log file name=/datavg1/newora/1_103_689789186.dbf thread=1 sequence=103
archived log file name=/datavg1/newora/1_104_689789186.dbf thread=1 sequence=104
media recovery complete, elapsed time: 00:00:07
Finished recover at 30-OCT-09
sql statement: alter database datafile 4 online
repair failure complete
RMAN> list failure;
no failures found that match specification
RMAN>
DRA的特点:
更加的人性化,记录问题, 分析问题,给出解决方案,到最后的自动修复,这样是解决问题的方法变得更加人性化;DRA的过程简单高效.
随着oracle数据库的更加强大,更加智能化,对于我们来讲,应该进行更高层次的学习.在学好基础的前提下,应该更加深入的了解oracle、使用oracle.
data recovery is a very costly option, always make a regular backups.;`.
i had my 1TB hard drive crashed and data recovery was horrendously expensive”.-
of course data entry services are very expensive that is why always make a backup of your files “’
@Arthritis Health Treatment Yes,All right. However,DRA in some cases can help us analyze the problems.
@Money Business :
that’s it,recovery big database is a nightmare. I think that large database to do redundancy in the storage level.