OCP-1Z0-053-V12.02-323题

 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-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 23-SEP-13
channel ORA_DISK_1: finished piece 1 at 23-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished 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 catalog
sql statement: alter database datafile 4 offline
 
RMAN> restore datafile 4;
 
Starting restore at 23-SEP-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=224 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 00004 to /u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 23-SEP-13
 
RMAN> recover datafile 4;
 
Starting recover at 23-SEP-13
using channel ORA_DISK_1
 
starting media recovery
media 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
 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值