Home  >  Article  >  Database  >  abmr:测试自动块恢复特性

abmr:测试自动块恢复特性

WBOY
WBOYOriginal
2016-06-07 15:58:531264browse

abmr:测试自动块恢复特性 参考原文: ABMR: How to test Automatic Block Recover Feature (Doc ID 1266059.1) 适用于: Oracle Server - Enterprise Edition - Version: 11.2.0.1.0 and later [Release: 11.2 and later ] Information in this document ap

abmr:测试自动块恢复特性

参考原文:
ABMR: How to test Automatic Block Recover Feature (Doc ID 1266059.1)

适用于:
Oracle Server - Enterprise Edition - Version: 11.2.0.1.0 and later [Release: 11.2 and later ]
Information in this document applies to any platform.

目标:
本文先是在datafile中制造了一个坏块然后触发了abmr 特性。
作为测试的预先要求,需要配置 dg的主库和备库,并正常同步。

解决方案:
1. 确认table中的block 含有数据。
你可以使用下面的查询语句来把 rowid 翻译成file# 和block#

select rowid, dbms_rowid.rowid_block_number(rowid) blockno, dbms_rowid.rowid_relative_fno(rowid) fno
from test.test
where rownum /

2.Using the block from the datafile identified file# using DD utility at OS level.
上面一句咋翻译?不之所云啊。
dd if=/dev/zero of=/oradata/orcl/users.dbf count=1 seek=164 bs=8192 conv=notrunc

3. 检查块是否损坏。
dbv file=/oradata/orcl/users.dbf blocksize=8192

4. 在主库上flush buffer cache,以强制从disk 上再读取一次数据到内存中。
5.再次查询一次该表,没有错误被显示,并且查询出的数据是有效的。
select * from test.test
where dbms_rowid.rowid_block_number(rowid)=164
and dbms_rowid.rowid_relative_fno(rowid)=9
/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn