转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/10859315

正确答案:D

一、模拟上题的错误:

1、删除4号文件

[oracle@mydb ~]$ cd /u01/app/oracle/oradata/ocm/
[oracle@mydb ocm]$ rm -rf users01.dbf

2、数据库宕机

sys@OCM> shutdown abort;
ORACLE instance shut down.

3、启动数据库报错,与上题报错一样

sys@OCM> startup
ORACLE instance started. Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 583011672 bytes
Database Buffers 247463936 bytes
Redo Buffers 6574080 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/app/oracle/oradata/ocm/users01.dbf'

4、如果试图在没有执行advise failure命令时使用repair failure命令,将出现如下错误:

[oracle@mydb ~]$ rman target /
RMAN> repair failure; using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of repair command at 09/01/2013 23:15:16
RMAN-06954: REPAIR command must be preceded by ADVISE command in same session

主要原因是:在运行repairfailure之前,要先运行advise failure,让rman列出错误,并且生成修复脚本,之后运行repair failure修复错误。

一、正确的恢复的过程如下:

1、      启动RMAN客户机,并使用前一节介绍的数据库修复命令来解决丢失数据问题,我们从list failure命令开始:

RMAN> list failure;

List of Database Failures
========================= Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
2002 HIGH OPEN 01-SEP-13 One or more non-system datafiles are missing

2、advisefailure命令对记录在自动诊断信息库中的所有故障给出建议。默认时,此命令只列出具有critical或high优先级的那些故障。除了产生所有输入故障的摘要外,此命令还对每个故障提供一个建议修复选项。通常,advise failure命令同时给出自动和手动修复选项。在advisefailure命令输出结束时,RMAN生成一个脚本,列出建议的修复选项的细节。如果你想自己进行修复,可以直接使用这个脚本,或者对它进行修改。

RMAN> advise failure;

List of Database Failures
========================= Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
2002 HIGH OPEN 01-SEP-13 One or more non-system datafiles are missing analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
analyzing automatic repair options complete Mandatory Manual Actions
========================
no manual actions available Optional Manual Actions
=======================
1. If file /u01/app/oracle/oradata/ocm/users01.dbf was unintentionally renamed or moved, restore it 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: /u01/app/oracle/diag/rdbms/ocm/ocm/hm/reco_3275375759.hm

3、利用advise failure命令提供的建议,epair  failure根据建议修复错误。

RMAN> repair failure;

Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/ocm/ocm/hm/reco_3275375759.hm contents of repair script:
# restore and recover datafile
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)? Y
executing repair script Starting restore at 01-SEP-13
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 /u01/app/oracle/oradata/ocm/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/dbs/0uoiptgq_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/dbs/0uoiptgq_1_1 tag=TAG20130901T230250
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 01-SEP-13 Starting recover at 01-SEP-13
using channel ORA_DISK_1 starting media recovery
media recovery complete, elapsed time: 00:00:01 Finished recover at 01-SEP-13 sql statement: alter database datafile 4 online
repair failure complete Do you want to open the database (enter YES or NO)? Y
database opened

QQ:252803295

学习交流QQ群:
DSI&Core Search  Ⅰ 群:127149411(技术:已满)
DSI&Core Search  Ⅱ 群:177089463(技术:未满)
DSI&Core Search  Ⅲ 群:284596437(技术:未满)
DSI&Core Search  Ⅳ 群:192136702(技术:未满)
DSI&Core Search  Ⅴ 群:285030382(闲聊:未满)

[每日一题] 11gOCP 1z0-052 :2013-09-1 RMAN-- repair failure........................................A20的更多相关文章

  1. [每日一题] 11gOCP 1z0-052 :2013-09-17 DRA--Data Recovery Advisor.............................B31

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/11818529 正确答案:AD 数据库恢复顾问(DRA)是一个诊断和修复数据库问题的工具.共 ...

  2. [每日一题] 11gOCP 1z0-053 :2013-10-9 backup with the KEEP option....................................33

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12517603 正确答案:AB 在Oracle 11g中,可以使用backup ….keep ...

  3. [每日一题] 11gOCP 1z0-053 :2013-10-12 RESULT_CACHE在哪个池?.............................44

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12657479 正确答案:B   Oracle 11g 新特性:Result Cache , ...

  4. [每日一题] 11gOCP 1z0-052 :2013-08-31 数据库的存储结构....................................................A8

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/10784599 . 正确答案:A 将逻辑存储与物理存储分开是关系数据库范例的必要部分.关系数 ...

  5. [每日一题] 11gOCP 1z0-052 :2013-09-19 创建用户...................................................B41

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/11834661 正确答案:BC 这道题比较简单,我就以答案来解析,如下来自官方文档创建用户的 ...

  6. [每日一题] 11gOCP 1z0-052 :2013-09-5 runInstaller oracle of no swap

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/11186995 正确答案:A 我们先来看下面这张截图,这是我在安装Oracle 11.2.0 ...

  7. [每日一题] 11gOCP 1z0-053 :2013-10-11 Flashback Data Archive属性.........................43

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12656897 正确答案:BD 闪回数据归档请参考:http://blog.csdn.net ...

  8. [每日一题] 11gOCP 1z0-053 :2013-10-7 the backup of MULT_DATA................................32

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12500579 正确答案:D      RMAN 的新增功能 对超大型文件应用 Intraf ...

  9. [每日一题] 11gOCP 1z0-052 :2013-09-2 ADDM(Automatic Database Diagnostic Monitor)...................A28

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/10951207 正确答案:BC AWR简称Automatic Workload Reposi ...

随机推荐

  1. base 使网页所有超链接都以新超链接的方式打开

    需求,网页有许多超链接,但是没有加 target="_blank",现在需要所有超链接都已新页面的方式打开 在head头添加 <base target="_blan ...

  2. VS下面的编译错误-----转换到 COFF 期间失败: 文件无效或损坏

    最近写了一个vs的小项目,然后编译的时候vs提示了"转换到 COFF 期间失败: 文件无效或损坏"的问题. 去网上搜索了一个解决方案.原作者的链接是:http://jingyan. ...

  3. JMX示例

    HelloJMXMBean.java package jmx; /** * Created by george on 14-8-21. */ public interface HelloJMXMBea ...

  4. jdbc 安装驱动

    在使用JDBC编程时需要连接数据库,导入JAR包是必须的,导入其它的jar包方法同样如此,导入的方法是 打开eclipse 1.右击要导入jar包的项目,点properties 2.左边选择java ...

  5. Linq 数据合并,比较,连接,交叉 维恩图工具

    Except 返回包含两个不同之处的linq结果集 Intersect 返回两个容器中共同的数据项 Union 返回所有成员,相同的成员出现多次,将只返回一个 Concat 返回所有数据项

  6. python中并行遍历:zip和map-转

    http://blog.sina.com.cn/s/blog_70e50f090101lat2.html 1.并行遍历:zip和map 内置的zip函数可以让我们使用for循环来并行使用多个序列.在基 ...

  7. 读书笔记-----Java并发编程实战(一)线程安全性

    线程安全类:在线程安全类中封装了必要的同步机制,客户端无须进一步采取同步措施 示例:一个无状态的Servlet @ThreadSafe public class StatelessFactorizer ...

  8. tomcat 系统架构与设计模式 第一部分 系统架构工作原理 转

    Tomcat 系统架构与设计模式,第 1 部分: 工作原理 许 令波, Java 开发工程师, 淘宝网 许令波,现就职于淘宝网,是一名 Java 开发工程师.对大型互联网架构设计颇感兴趣,并对一些开源 ...

  9. java HastTable实现

    public class HashTable{ private String[] name;    //关键字 private int sum;    //容量 public static void ...

  10. LINUX6.3下RHCS的安装文档

    LINUX6.3下RHCS的安装及集群的配置文档 环境: 目前要给华为E6000系列的两个刀片安装RHCS,每一块刀片有两个业务网口和一个管理网口,但是看不见不物理网卡,而是连接到刀片自身携带的一个交 ...