323.What is the correct order of the following commands if you wanted to restore datafile 4, which was
accidentally removed from the file system?
A. sql 'alter database datafile 4 online';
B. restore datafile 4;
C. recover datafile 4;
D. sql 'alter database datafile 4 offline';
E. startup
F. shutdown
G. a, c, b, d
H. d, b, c, a
I. f, d, b, c, a, e
J. c, a, b, d, f
K. a, b, d, e
Answer: B
答案解析:
此题的选项有点问题,故从另一套找来正确的题。
按题意:数据文件4不小心被删除,现在需要恢复,以下是恢复步骤:
1、实验之前需要先备份:
RMAN> backup datafile 4; Starting backup at 23-SEP-13using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbfchannel ORA_DISK_1: starting piece 1 at 23-SEP-13channel ORA_DISK_1: finished piece 1 at 23-SEP-13piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 23-SEP-13 2、模拟不小心删除[oracle@rtest test0910]$ rm /u01/app/oracle/oradata/test0910/users01.dbf 3、开始恢复RMAN> sql 'alter database datafile 4 offline'; using target database control file instead of recovery catalogsql statement: alter database datafile 4 offline RMAN> restore datafile 4; Starting restore at 23-SEP-13allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=224 device type=DISK channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test0910/users01.dbfchannel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkpchannel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01Finished restore at 23-SEP-13 RMAN> recover datafile 4; Starting recover at 23-SEP-13using channel ORA_DISK_1 starting media recoverymedia recovery complete, elapsed time: 00:00:01 Finished recover at 23-SEP-13 RMAN> sql 'alter database datafile 4 online'; sql statement: alter database datafile 4 online
版权声明:本文为博主原创文章,未经博主允许不得转载。