HOW TO PERFORM BLOCK MEDIA RECOVERY (BMR) WHEN BACKUPS ARE NOT TAKEN BY RMAN. (Doc ID 342972.1)

In this Document
Applies to:
Oracle Database - Enterprise Edition - Version 9.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
**** Checked for Relevance on 16-NOV-2015 ****
Goal
To Perform Block Media Recovery (BMR) when there are OS-backups available, but NO RMAN backups.
Consider that a block corruption is reported in the database and the corruption is not wide spread.
Since RMAN is not used in the database the initial solution would be to restore the file from backup and then recover. But this method will require the file should be offline during the entire process. On the other hand if BMR can be used, the file does not need to be taken offline.
This document describes to how to use the OS backup via RMAN and then to perform the BMR.
Solution
-----------
The backups can be cataloged with RMAN and then BMR can be performed.
Step 1 : Identify the backup of the datafilefile which has the corrupted block(s) and catalog it within RMAN.
Example: Backup is /u01/backup/users01.dbf
$ export ORACLE_SID=orcl
$ RMAN target=/
RMAN> catalog datafilecopy ‘/u01/backup/users01.dbf’;
Note: It is a good idea to run DBV against the backup of the datafile to ensure the block is free from corruption within the backup copy. If it is corrupted then the BMR will fail.
Step 2 : Check the archived redologs.
RMAN is using the archived redologs which are known in V$ARCHIVED_LOG. If the archivelog files are not
reported in V$ARCHIVED_LOG because they are moved to another location, or aged out of the controlfile,
then they need to be cataloged as well.
First verify the existing archived redologs :
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
Then catalog the unknown archived redologs :
RMAN> catalog archivelog ‘/u01/backup/archivelog/Arch_ocl_1_30.dbf’
Step 3 : Perform the BMR
Having datafile(s) and all required archivelogs cataloged, we can run BMR as follows.
Example for a block recovery of blocks 99, 100, 101 in datafile 5
RMAN> blockrecover datafile 5 block 99,100,101;
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战