331.Which of the following represents the correct way to perform an online recovery of datafile 4, which is
assigned to a tablespace called USERS?
A. shutdown restore datafile 4; recover datafile 4; alter database open;
B. Sql alter database datafile 4 offline; restore datafile 4; recover datafile 4; alter database open;
C. Sql alter database datafile 4 offline; restore datafile 4; Sql alter database datafile 4 online;
D. Sql alter database datafile 4 offline; restore database datafile 4; recover database datafile 4; Sql alter
database datafile 4 online;
E. Sql alter database datafile 4 offline; restore datafile 4; recover datafile 4; Sql alter database datafile 4
online;
Answer: E从题中得知,要在线恢复datafile 4。因为datafile 4不是关键数据文件,故可以offline来还原恢复。
恢复步骤为,先offline,在还原恢复,再online即可。
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/test0924/test0924/hm/reco_172511374.hm
contents of repair script:
# restore and recover datafile
sql 'alter database datafile4 offline';
restore datafile 4;
recover datafile 4;
sql 'alter database datafile 4 online';