CSDN博客

img biti_rainy

9i rman block recover

发表于2004/7/12 11:34:00  4002人阅读

http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90136/rcmsyn10.htm#79197
  
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:/ORACLE/ORADATA/RAINY/TEST.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>  

 

0 0

相关博文

我的热门文章

img
取 消
img