2012-11-21 11gR2 "Backup and Recovery User's Guide" page 301 - 394

 

 

Physical and Logical Block Corruption -- 物理坏块和逻辑坏块
In a physical corruption, which is also called a media corruption, the database does
not recognize the block at all: the checksum is invalid, the block contains all zeros, or
the header and footer of the block do not match.
--物理坏块也就是说数据库不认为它是一个正确的块

 

In a logical corruption, the contents of the block are logically inconsistent. Examples of
logical corruption include corruption of a row piece or index entry. If RMAN detects
logical corruption, then it logs the block in the alert log and server session trace file.
--逻辑坏块,里面的行片和索引键损坏

 

Detection of Block Corruption -- 坏块的探测
Oracle Database supports different techniques for detecting, repairing, and monitoring
block corruption. The technique depends on whether the corruption is interblock
corruption or intrablock corruption. In intrablock corruption, the corruption occurs
within the block itself. This corruption can be either physical or logical. In an
interblock corruption, the corruption occurs between blocks and can only be logical.
--INTERBLOCK偏向于逻辑,而INTRABLOCK偏向于物理

 

 

To determine whether datafiles require media recovery: -- 确定需要恢复的文件

Query V$DATAFILE_HEADER to determine the status of your datafiles. Run the
following SQL statements to check the datafile headers:
SELECT FILE#, STATUS, ERROR, RECOVER, TABLESPACE_NAME, NAME
FROM V$DATAFILE_HEADER
WHERE RECOVER = 'YES'
OR (RECOVER IS NULL AND ERROR IS NOT NULL);

 

Optionally, query V$RECOVER_FILE to list datafiles requiring recovery by datafile
number with their status and error information. For example, execute the
following query:
SELECT FILE#, ERROR, ONLINE_STATUS, CHANGE#, TIME
FROM V$RECOVER_FILE;


Alternatively, you can use a SQL query to determine the log sequence number that
contains the target SCN and then recover through this log. For example, run the
following query to list the logs in the current database incarnation (sample output
included):
--在进行数据恢复的时候,你可以查出日志与SCN号的对应关系


SELECT RECID, STAMP, THREAD#, SEQUENCE#, FIRST_CHANGE#
FIRST_TIME, NEXT_CHANGE#
FROM V$ARCHIVED_LOG
WHERE RESETLOGS_CHANGE# =
( SELECT RESETLOGS_CHANGE#
FROM V$DATABASE_INCARNATION
WHERE STATUS = 'CURRENT');

RECID STAMP THREAD# SEQUENCE# FIRST_CHAN FIRST_TIM NEXT_CHANG
---------- ---------- ---------- ---------- ---------- --------- ----------
1 344890611 1 1 20037 24-SEP-05 20043
2 344890615 1 2 20043 24-SEP-05 20045
3 344890618 1 3 20045 24-SEP-05 20046


Missing Redo During Block Recovery -- 在块恢复的过程中丢失REDO
When RMAN first detects missing or corrupt redo records during block media
recovery, it does not immediately signal an error because the block undergoing
recovery may create a new one later in the redo stream. When a block is recreated, all
previous redo for that block becomes irrelevant because the redo applies to an old
incarnation of the block.
 -- 即便在块恢复的过程中,找不到可以应用的REDO,它也未必就会失败,因为接下来可能会有其他“动作”,
举个例子,比如在随后的日志中,坏块所在的那张表被删除,那么对ORACLE来说,它可以重新CREATE一个新块给接下去
的对象使用,所以此刻的坏块REDO的丢失不影响新块的使用,它照样可以RECOVER下去。

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值