OCP-IZO-053_QUESTION360

QUESTION NO: 360  

When performing a full database disaster recovery with RMAN, in what order would you execute these steps?

A. Restore the control file from autobackups.

B. Run the RMAN restore and recover command. 

C. Restore the database spfile from autobackups. 

D. Make the RMAN backup set pieces available.

E. Open the database with the alter database open resetlogs command. 

F. Open the database with the alter database open command.

G. a, b, c, d, e, f

H. c, d, a, b, f 

I. d, c, a, b, f 

J. d, b, d, c, e

K. d, c, a, b, e

 

【题目示意】

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

【解析】

    在恢复数据库的时候,如果Spflie文件丢失,在连接到tman target 后,在还原参数文件之前,必须set dbid和startup force nomount。然后是还原控制文件,在还原数据文件,恢复数据文件,以resetlogs的形式打开数据库。

【实验】

1)删除所有的参数文件,控制文件,数据文件,关闭数据库,有报错

SYS@ENMOEDU > shutdown

Database closed.

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/u01/app/oracle/oradata/ENMOEDU/control01.ctl'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3

SYS@ENMOEDU> shutdown abort 

ORACLE instance shut down. 

 

2)恢复参数文件

[oracle@ENMOEDU ~]$ rman target/

 

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Feb 4 18:33:18 2014

 

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

 

connected to target database (not started)

 

RMAN> startup nomount;

 

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initENMOEDU.ora'

 

starting Oracle instance without parameter file for retrieval of spfile

Oracle instance started

 

Total System Global Area     159019008 bytes

 

Fixed Size                     1343612 bytes

Variable Size                 79695748 bytes

Database Buffers              71303168 bytes

Redo Buffers                   6676480 bytes

 

RMAN> set dbid=95949543;

 

executing command: SET DBID

 

RMAN> restore spfile from '/u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_04/o1_mf_s_838664884_9h1j5ox7_.bkp';

 

Starting restore at 04-FEB-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=111 device type=DISK

 

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_04/o1_mf_s_838664884_9h1j5ox7_.bkp

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 04-FEB-14

 

3)恢复控制文件

SYS@ENMOEDU > shutdown immediate;

ORA-01507: database not mounted

 

 

ORACLE instance shut down.

SYS@ENMOEDU > startup nomount;

ORACLE instance started.

 

Total System Global Area  422670336 bytes

Fixed Size                  1345380 bytes

Variable Size             310380700 bytes

Database Buffers          104857600 bytes

Redo Buffers                6086656 bytes

[oracle@ENMOEDU ~]$ rman target/

 

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Feb 4 20:30:25 2014

 

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

 

connected to target database: ENMOEDU (not mounted)

 

RMAN>  restore controlfile from autobackup;

 

Starting restore at 04-FEB-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=10 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_04/o1_mf_s_838664884_9h1j5ox7_.bkp found in the recovery area

AUTOBACKUP search with format "%F" not attempted because DBID was not set

channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_04/o1_mf_s_838664884_9h1j5ox7_.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 04-FEB-14

 

4恢复数据文件

SYS@ENMOEDU > alter database mount;

 

Database altered.

RMAN> restore database;

 

Starting restore at 04-FEB-14

released channel: ORA_DISK_1

Starting implicit crosscheck backup at 04-FEB-14

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=10 device type=DISK

Crosschecked 11 objects

Finished implicit crosscheck backup at 04-FEB-14

 

Starting implicit crosscheck copy at 04-FEB-14

using channel ORA_DISK_1

Finished implicit crosscheck copy at 04-FEB-14

 

searching for all files in the recovery area

cataloging files...

cataloging done

 

List of Cataloged Files

=======================

File Name: /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_04/o1_mf_s_838661908_9h1f8ol9_.bkp

File Name: /u01/app/oracle/fast_recovery_area/ENMOEDU/autobackup/2014_02_04/o1_mf_s_838664884_9h1j5ox7_.bkp

 

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 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_04/o1_mf_nnndf_TAG20140204T173631_9h1f521x_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ENMOEDU/backupset/2014_02_04/o1_mf_nnndf_TAG20140204T173631_9h1f521x_.bkp tag=TAG20140204T173631

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 04-FEB-14

 

RMAN> recover database;

 

Starting recover at 04-FEB-14

using channel ORA_DISK_1

 

starting media recovery

 

archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/ENMOEDU/archivelog/2014_02_04/o1_mf_1_4_9h1j53lh_.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_04/o1_mf_1_4_9h1j53lh_.arc thread=1 sequence=4

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

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

Finished recover at 04-FEB-14

 

6)打开数据库

SYS@ENMOEDU > alter database open resetlogs;

 

Database altered.

 

【小结】

对数据库进行恢复的时候要先恢复参数文件,再恢复控制文件,最后是数据文件。因此选择K

【答案】 k

 

相关参考

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

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

 

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

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

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值