Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2802691
  • 博文数量: 389
  • 博客积分: 4177
  • 博客等级: 上校
  • 技术积分: 4773
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-16 23:29
文章分类

全部博文(389)

分类: Oracle

2014-04-24 21:32:42

                                         RMAN的preview功能
 
   在RMAN中备份时,经常使用preview来校验当前的数据库可恢复性,以及恢复的时候需要用到哪些
backup piece,archivelog以及相应的文件是否存在等.


oracle 11g

RMAN> backup database;

Starting backup at 24-APR-14

..................................


RMAN> delete noprompt archivelog all;

..................


RMAN>  restore database preview;

Starting restore at 24-APR-14
using channel ORA_DISK_1


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7       Full    6.76G      DISK        00:04:14     24-APR-14     
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20140424T131155
        Piece Name: /usr/test/08p6hksr_1_1
  List of Datafiles in backup set 7
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 591225164  24-APR-14 /u01/app/oracle/oradata/t/system01.dbf
  2       Full 591225164  24-APR-14 /u01/app/oracle/oradata/t/sysaux01.dbf
  3       Full 591225164  24-APR-14 /u01/app/oracle/oradata/t/undotbs01.dbf
  4       Full 591225164  24-APR-14 /u01/app/oracle/oradata/t/users01.dbf
  5       Full 591225164  24-APR-14 /u01/app/oracle/oradata/t/users02.dbf

archived logs generated after SCN 591224897 not found in repository
Media recovery start SCN is 591224897
Recovery must be done beyond SCN 591225164 to clear datafile fuzziness
Finished restore at 24-APR-14

可以看如果需要resotre database需要的backuppiece和archivelog,但是有些
archivelog被我手动删掉了,所以已经不能进行完全恢复了.

restore validate database也可以做校验,但是做的工作会更多,也去读取相应的文件
等信息,执行加解密,解压缩之类的。


RMAN> restore validate database
2> ;

Starting restore at 24-APR-14
using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /usr/test/08p6hksr_1_

......................................

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