Oracle OCP 1Z0 053 Q154(Recover Datafile)

abstractcyj發表於2016-04-05
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章