[每日一题] 11gOCP 1z0-053 :2013-10-14 普通文件损的最佳恢复步骤.................................54

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



正确答案C

 

这题简单,主要考在归档模式下,有备份,一个非关键性的文件坏了的恢复过程。

 

答案A不正确,看上面的错误提示,数据库在重启时,报11号文件不能打开,说明这个文件已损坏或丢失了,库都打不开了,怎么重建这个表空间呢?

 

答案B不正确,少了最后一步recover恢复命令。

 

答案C正确。实验演示:

(1)      rman全库备份

   
[oracle@mydb ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 15 23:15:42 2013

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

connected to target database: OCM (DBID=2206937749)

RMAN> backup database;

Starting backup at 15-OCT-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=149 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=00001 name=/u01/app/oracle/oradata/ocm/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ocm/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/ocm/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ocm/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ocm/gyj01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/ocm/tp2.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ocm/gyj02.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/ocm/tp01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/ocm/mrkt01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ocm/users01.dbf
channel ORA_DISK_1: starting piece 1 at 15-OCT-13
channel ORA_DISK_1: finished piece 1 at 15-OCT-13
piece handle=/u01/app/oracle/product/11.2.0/dbs/1eomgj63_1_1 tag=TAG20131015T231619 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
Finished backup at 15-OCT-13

Starting Control File and SPFILE Autobackup at 15-OCT-13
piece handle=/backup/rman/c-2206937749-20131015-00 comment=NONE
Finished Control File and SPFILE Autobackup at 15-OCT-13

(2)      删除数据文件

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

(3)      数据库关闭

RMAN> shutdown abort;

Oracle instance shut down

(4)      数据库重启报错

RMAN> startup

connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 10/15/2013 23:25:52
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/u01/app/oracle/oradata/ocm/gyj02.dbf'


(5)      开始还原7号文件

RMAN> restore datafile 7;

Starting restore at 15-OCT-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK

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/ocm/gyj02.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/dbs/1eomgj63_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/dbs/1eomgj63_1_1 tag=TAG20131015T231619
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 15-OCT-13

(6)      开始恢复7号文件

 RMAN> recover datafile 7;

Starting recover at 15-OCT-13
using channel ORA_DISK_1

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

Finished recover at 15-OCT-13

(7)      正常打开数据库

RMAN> alter database open;

database opened

答案D不正确,在归档模式下,某一个文件坏了,归档日志、在线重做日志都是好的,那做完全恢复就可以了,做完全恢复,只要还原那一个损坏的文件和恢复它就Ok了,无须还原全部数据文件和恢复全部文件。


QQ:252803295

技术交流QQ群:
DSI&Core Search  Ⅰ 群:127149411(2000人技术群:未满)
DSI&Core Search  Ⅱ 群:177089463(1000人技术群:未满)
DSI&Core Search  Ⅲ 群:284596437(500人技术群:未满)
DSI&Core Search  Ⅳ 群:192136702(500人技术群:未满)
DSI&Core Search  Ⅴ 群:285030382(500人闲聊群:未满)


MAIL:dbathink@hotmail.com

BLOG: http://blog.csdn.net/guoyjoe

WEIBO:http://weibo.com/guoyJoe0218

ITPUB: http://www.itpub.net/space-uid-28460966.html

OCM:   http://education.oracle.com/education/otn/YGuo.HTM 

ACONG:  http://www.acoug.org/category/membership



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值