Chinaunix首页 | 论坛 | 博客
  • 博客访问: 522525
  • 博文数量: 134
  • 博客积分: 7990
  • 博客等级: 少将
  • 技术积分: 1290
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 11:43
文章分类

全部博文(134)

文章存档

2009年(7)

2008年(80)

2007年(47)

我的朋友

分类: Oracle

2007-11-10 08:47:58


  
Examples
Recovering a Group of Corrupt Blocks: Example
This example recovers corrupt blocks in three datafiles:  
  
BLOCKRECOVER DATAFILE 2 BLOCK 12, 13 DATAFILE 7 BLOCK 5, 98, 99 DATAFILE 9 BLOCK 19;
  
Limiting Block Media Recovery by Type of Restore: Example
The following example recovers a series of blocks and restores only from datafile copies:  
  
RUN
{
   BLOCKRECOVER
     DATAFILE 3 BLOCK 2,3,4,5
     TABLESPACE sales DBA 4194405, 4194409, 4194412
   FROM DATAFILECOPY;
}
  
Limiting Block Media Recovery by Backup Tag: Example
This example recovers blocks and restores only from the backup set with the tag weekly_backup:  
  
BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 FROM TAG "weekly_backup";
  
Limiting Block Media Recovery by Time: Example
The following example recovers two blocks in the SYSTEM tablespace and forces the blocks to be restored from backups created at least two days ago:  
  
BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 RESTORE UNTIL TIME 'SYSDATE-2';

 

rman 可以在数据文件 online 的情况下 恢复逻辑坏块
手工关闭数据库编辑数据文件导致损坏,然后测试
  
SQL> select count(*) from rainy.test;
select count(*) from rainy.test
                            *
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 2, block # 12)
ORA-01110: data file 2: 'E:ORACLEORADATARAINYTEST.DBF'
  
RMAN> run{
2> blockrecover datafile 2 block 12 from datafilecopy;}
  
Starting blockrecover at 2003-09-08 12:22:27
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=16 devtype=DISK
  
channel ORA_DISK_1: restoring block(s) from datafilecopy E:TEST.DBF
  
starting media recovery
media recovery complete
  
Finished blockrecover at 2003-09-08 12:22:34
  
RMAN>
  
SQL>  select count(*) from rainy.test;
  
   COUNT(*)
----------
      29725
  
SQL>  

 

 

阅读(964) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~