OCP-IZO-053_QUESTION332

QUESTION NO: 332 

David managed to accidentally delete the datafiles for database called DSL. He called Heber and Heber tried to help but he managed to delete the control files of the database. Heber called Bill and Bill saved the day. They are using a recovery catalog for this database. What steps did Bill perform to recover the database and in what order?

A. Restored the control file with the RMAN restore controlfile command. 

B. Mounted the DSL instance with the alter database mount command.

C. Restored the datafiles for the DSL database with the RMAN restore command. 

D. Opened the DSL database with the alter database open resetlogs command.

E. Recovered the datafiles for the DSL database with the RMAN recover command. 

F. Started the DSL instance.

G. Connected to the recovery catalog with RMAN. 

H. a, b, c, d, e, f, g

I. b, c, d, g, f, e, a

J. g, f, a, b, c, e, d

K. c, a, d, b, f, e, g

L. g, f, a, b, e, c, d 

【题目示意】

此题考查有关于RECOVERY DATABASE的相关知识。

【解析】

    对于CATALOG方式,所有的备份信息在CATALOG库中都存在,直接restore controlfile就可以了,再还原数据文件,恢复数据文件,以resetlogs的方式打开数据库就可以啦。

【实验】

1)控制文件,数据文件丢失,用恢复目录的方式恢复数据库。连接到恢复目录上

[oracle@ENMOEDU admin]$ rman target / catalog  rcowner/oracle@ENMO;

 

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Feb 5 15:06:43 2014

 

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

 

connected to target database (not started)

connected to recovery catalog database

 

2)恢复控制文件

RMAN> startup nomount;

 

Oracle instance started

 

Total System Global Area     422670336 bytes

 

Fixed Size                     1345380 bytes

Variable Size                318769308 bytes

Database Buffers              96468992 bytes

Redo Buffers                   6086656 bytes

 

RMAN> restore controlfile from autobackup;

 

Starting restore at 05-FEB-14

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=134 device type=DISK

 

recovery area destination: /u01/app/oracle/fast_recovery_area

database name (or database unique name) used for search: ENMOEDU

channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_05/o1_mf_s_838736684_9h3p9fy9_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20140205

channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_05/o1_mf_s_838736684_9h3p9fy9_.bkp

channel ORA_DISK_1: control file restore from AUTOBACKUP complete

output file name=/u01/app/oracle/oradata/ENMOEDU/control01.ctl

output file name=/u01/app/oracle/fast_recovery_area/ENMOEDU/control02.ctl

Finished restore at 05-FEB-14

3)恢复数据文件

SYS@ENMOEDU > alter database mount;

[oracle@ENMOEDU admin]$ rman target / catalog  rcowner/oracle@ENMO;

 

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Feb 5 15:13:13 2014

 

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

 

connected to target database: ENMOEDU (DBID=95949543, not open)

connected to recovery catalog database

RMAN> restore database;

 

Starting restore at 05-FEB-14

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 00001 to /u01/app/oracle/oradata/ENMOEDU/system01.dbf

channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ENMOEDU/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ENMOEDU/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ENMOEDU/users01.dbf

channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/ENMOEDU/he.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ENMOEDU/backupset/2014_02_05/o1_mf_nnndf_TAG20140205T120405_9h3g1rhx_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ENMOEDU/backupset/2014_02_05/o1_mf_nnndf_TAG20140205T120405_9h3g1rhx_.bkp tag=TAG20140205T120405

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:25

Finished restore at 05-FEB-14

RMAN> recover database;

 

Starting recover at 05-FEB-14

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=125 device type=DISK

 

starting media recovery

 

archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/fast_recovery_area/ENMOEDU/archivelog/2014_02_05/o1_mf_1_2_9h3oqzhk_.arc

archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/oradata/ENMOEDU/redo01.log

archived log file name=/u01/app/oracle/fast_recovery_area/ENMOEDU/archivelog/2014_02_05/o1_mf_1_2_9h3oqzhk_.arc thread=1 sequence=2

archived log file name=/u01/app/oracle/oradata/ENMOEDU/redo01.log thread=1 sequence=1

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

Finished recover at 05-FEB-14

 

 

4)以resetlogs的方式打开数据库

SYS@ENMOEDU > alter database open resetlogs;

Database altered.

 

【小结】

用catalog的方式恢复数据库,要以catalog的方式连接到数据库上,然后恢复控制文件再使数据文件,以resetlogs的方式打开数据库。因此选择J

【答案】 J

 

相关参考

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2008.htm#RCMRF90314

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29435844/viewspace-1078444/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29435844/viewspace-1078444/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值