风哥教程

培训 . 交流 . 分享
Make progress together!

Oracle 11g数据库通过ABMR自动修复坏块的方法

[复制链接]
内容发布:风哥| 发布时间:2013-12-24 10:34:17
Oracle 11g通过ABMR自动修复坏块的方法11g Active DataGuard,如果我们使用real time的功能,我们就可以使用Automatic Block Media Repair的特性来修复主库的坏块. 因为当你使用了real time的功能后,你对主库的更新会迅速传到备库,此时主库出现坏块,我们可以相反的从备库上把已经applyingblock在传回给主库。
1open real time Feature
alter database recover managed standby database cancel;
alter database open read only;
alter database recover managed standby database using current logfile disconnect;
2Identify the blocks allocated to a table that contains containing data.
You may use the following query to translate the rowid to a file# and block#
select rowid, dbms_rowid.rowid_block_number(rowid) blockno, dbms_rowid.rowid_relative_fno(rowid) fno
from test.test
where rownum < 100
/
3. Using the block from the datafile identified file# using DD utility at OS level.
dd if=/dev/zero f=/oradata/orcl/users.dbf count=1 seek=164 bs=8192 conv=notrunc
4. Check the datafile for corruption :
dbv file=/oradata/orcl/users.dbf blocksize=8192
5. Flush the buffer cache on primary database to force a re-read the data from disk
alter system flush buffer_cache;
6. Attempt to select from the table. No error should occur and the data should return as valid
select * from test.test
where dbms_rowid.rowid_block_number(rowid)=164
and dbms_rowid.rowid_relative_fno(rowid)=9
/
此时我们可以看到数据能够查询出来,那么看一下我们的后台alert日志,记录了下列内容:
Wed Jul 07 17:34:25 2012
ALTER SYSTEM: Flushing buffer cacheWed Jul 07 17:35:09 2012Hex dump of (file 9, block 164) in trace file /oracle/app/oracle/diag/rdbms/dg1/dg1/trace/dg1_ora_4391.trcCorrupt block relative dba: 0x010000ab (file 9, block 164)Completely zero block found during multiblock buffer readReading datafile '/oradata/orcl/users.dbf ' for corruption at rdba: 0x010000ab (file 9, block 164)Reread (file 9, block 164) found same corrupt dataStarting background process ABMRWed Jul 07 17:35:09 2012ABMR started with pid=55, OS id=4364Auto BMR service is active.Requesting Auto BMR for (file 9, block 164)Waiting Auto BMR response for (file 9, block 164)Auto BMR successful以上方法详见mos文档:ID 1266059.1


上一篇:Oracle数据恢复_通过kfed repair修复Oracle ASM磁盘头
下一篇:【Oracle RAC】Oracle 11g CRS卸载重建与Oracle 10g CRS卸载重建对比
专业提供Oracle/MySQL/NoSQL/Linux数据库培训与技术支持服务,QQ号:113257174
关注风哥教程微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/MySQL/Linux群4-5:189070296  150201289  
Oracle/MySQL/Linux群6-8:244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux
回复

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门文章教程

  • 实战PHP与MySQL权威指南PDF电子书下载
  • 大数据技术与应用入门培训教程(电子版下载
  • Oracle 12cR2 九大新功能全面曝光_详解云数
  • Oracle OCP认证考试IZ0-053题库共712题数据
  • MySQL5权威指南(第3版)PDF电子版下载
  • 风哥Oracle数据库巡检工具V1.0(附2.6网页
快速回复 返回顶部 返回列表