ITPub博客

首页 > 数据库 > Oracle > Oracle OCP 1Z0 053 Q154(Recover Datafile)

Oracle OCP 1Z0 053 Q154(Recover Datafile)

原创 Oracle 作者:abstractcyj 时间:2016-04-05 11:35:15 0 删除 编辑
154.A database is running in ARCHIVELOG mode and regular backups are performed. A user receives
the following error message:

Which is the recommended sequence of operations you need to perform for the query successfully?
A. Drop the affected tablespace, re-create the tablespace, restore the datafiles, and the tablespace.
B. Take the affected datafile offline (if not already offline), restore the damaged image of the datafile, and
then bring it online.
C. Restart the database in MOUNT mode, restore the damaged datafile, recover the datafile and then
open the database with resetlogs.
D. Put the database in RESTRICTED mode, restore all the datafiles in the affected datafile and recover
the tablespace, and then put the database in normal operational mode.
Answer: C

D选项, 使用RESTRICTED mode, RMAN也会连接不了
C选项, 可以直接ALTER DATABASE OPEN, 没有必要RESETLOGS

参考:http://www.cnblogs.com/jyzhao/p/5265649.html

验证:
RMAN> restore datafile 5;


Starting restore at 05-APR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 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 00005 to /u01/app/oracle/oradata/CATDB/datafile/users02.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp tag=TAG20160405T131914
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 05-APR-16


RMAN> recover datafile 5;


Starting recover at 05-APR-16
using channel ORA_DISK_1


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


Finished recover at 05-APR-16


RMAN> sql 'alter database open';


sql statement: alter database open

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

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    555
  • 访问量
    838175