oracle: ocp题解与实验(11/205) .

题目: 
11. You work as a database administrator at Certkiller .com. Your database is open 
and running in ARCHIVELOG mode. You take RMAN full backups every Sunday night. On Monday morning, 
while querying the user1.employees table, you receive the following error message:
01578: ORACLE data block corrupted (file # 5, block # 51)
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
You need to rectify the corruption while ensuring the following: The data file should remain online. 
The mean time to recover (MTTR) should be minimal. You are not using a backup control file and all the
archived logs are accessible. Which option would you choose?
A. flash back the corrupted blocks
B. use the DBMS_REPAIR package
C. use the RMAN TSPITR command
D. use the RMAN BLOCKRECOVER command
E. use the RESTORE DATABASE and RECOVER DATABASE commands
F. investigate the time at which the corruption occurred and perform a point-in-time recovery
Answer: D

 题目翻译:简单来说是数据库运行于archivelog模式,周日做了rman的全备,而周一早上看到日志错误:block corrupted 发生在data file 5 并有指定的文件号和块号,要求datafile online并且mttr尽可能的短,不能用备份控制文件,但所有的归档日志文件可用,你会选择哪种方式?

答案解释:明显是在考block recovery的,块坏了,是最小范围的错误,当然没必要大动干戈,使用块恢复方法即可,看下官方文档的描述:

Performing Block Media Recovery with RMAN

TheBLOCKRECOVER command can restore and recover individual datablocks within a datafile. This procedure is useful when a trace file or standard output reveals that a small number of blocks within a datafile are corrupt.

Block media recovery is not useful in cases where the extent of data loss or corruption is not known; in this case, use datafile recovery instead.

文档并给出了和题目一样场景的示例:

Block Media Recovery Using All Available Backups

In this scenario, you identify the blocks that require recovery and then use any available backup to perform the restore and recovery of these blocks.

To recover datablocks by using all available backups:

Obtain the datafile numbers and block numbers for the corrupted blocks. Typically, you obtain this output from the standard output, thealert.log, trace files, or a media management interface. For example, you may see the following in a trace file:

ORA-01578: ORACLE data block corrupted (file # 8, block # 13)
ORA-01110: data file 8: '/oracle/oradata/trgt/users01.dbf'
ORA-01578: ORACLE data block corrupted (file # 2, block # 19)
ORA-01110: data file 2: '/oracle/oradata/trgt/undotbs01.dbf'

Assuming that you have preallocated automatic channels, run theBLOCKRECOVER command at the RMAN prompt, specifying the file and block numbers for the corrupted blocks as in the following example:

RMAN> BLOCKRECOVER DATAFILE 8 BLOCK 13 DATAFILE 2 BLOCK 19;

所以答案D是最合适的。值得注意的是alert_###.log会报出错误哦,且有详细的块信息!
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值