Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1188794
  • 博文数量: 253
  • 博客积分: 5892
  • 博客等级: 大校
  • 技术积分: 1942
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-24 14:20
文章分类

全部博文(253)

文章存档

2012年(98)

2011年(155)

分类: Oracle

2011-12-15 10:01:54

  1. 1 显示当前的配置信息
  2. ===========================
  3. 1.01 RMAN> show all;
  4. 1.02 查询RMAN设置中非默认值:
  5. SQL> select name,value from v$rman_configure;

  6. 2. 常用的configure选项
  7. ===========================
  8. 2.01 保存策略 (retention policy)
  9. configure retention policy to recovery window of 3 days;
  10. configure retention policy to redundancy 3;
  11. configure retention policy clear;



  12. 备份策略保持
  13. 分为两个保持策略,一个是时间策略,决定至少有一个备份能恢复到指定的日期,一个冗余策略,规定至少有几个冗余的备份。
  14. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
  15. CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
  16. CONFIGURE RETENTION POLICY TO NONE;
  17. 在第一个策略中,是保证至少有一个备份能恢复到Sysdate-5 的时间点上,之前的备份将标记为Obsolete。第二个策略中说明至少需要有三个冗余的备份存在,如果多余三个备份以上的备份将标记为冗余。NONE 可以把使备份保持策略失效,Clear 将恢复默认的保持策略


  18. 2.02 备份优化 backup optimization
  19. configure backup optimization on;
  20. configure backup optimization off;
  21. configure backup optimization clear;

  22. 2.03 默认设备 default device type
  23. configure default device type to disk;
  24. configure default device type to stb;
  25. configure default device type clear;

  26. 2.04 控制文件 controlfile
  27. configure controlfile autobackup on;
  28. configure controlfile autobackup format for device type disk to ''/cfs01/backup/conf/conf_%F'';
  29. configure controlfile autobackup clear;
  30. configure controlfile autobackup format for device type disk clear;
  31. configure snapshot controlfile name to ''/cfs01/backup/snapcf/scontrofile.snp'';
  32. configrue snapshot controlfile name clear;

  33. 2.05 并行数(通道数) device type disk|stb pallelism n;
  34. configure device type disk|stb parallelism 2;
  35. configure device type disk|stb clear;
  36. configure channel device type disk format ''e/:rmanback_%U'';
  37. configure channel device type disk maxpiecesize 100m
  38. configure channel device type disk rate 1200K
  39. configure channel 1 device type disk format ''e/:rmanback_%U'';
  40. configure channel 2 device type disk format ''e/:rmanback_%U'';
  41. configure channel 1 device type disk maxpiecesize 100m

  42. 2.06 生成备份副本 datafile|archivelog backup copies
  43. configure datafile backup copies for device type disk|stb to 3;
  44. configure archivelog backup copies for device type disk|stb to 3;
  45. configure datafile|archivelog backup copies for device type disk|stb clear
  46. BACKUP DEVICE TYPE DISK DATABASE
  47. FORMAT ''/disk1/backup/%U'', ''/disk2/backup/%U'', ''/disk3/backup/%U'';

  48. 2.07 排除选项 exclude
  49. configure exclude for tablespace ''users'';
  50. configrue exclude clear;

  51. 2.08 备份集大小 maxsetsize
  52. configure maxsetsize to 1G|1000M|1000000K|unlimited;
  53. configure maxsetsize clear;

  54. 2.09 其它选项 auxiliary
  55. CONFIGURE AUXNAME FOR DATAFILE 1 TO ''/oracle/auxfiles/aux_1.f'';
  56. CONFIGURE AUXNAME FOR DATAFILE 2 TO ''/oracle/auxfiles/aux_2.f'';
  57. CONFIGURE AUXNAME FOR DATAFILE 3 TO ''/oracle/auxfiles/aux_3.f'';
  58. CONFIGURE AUXNAME FOR DATAFILE 4 TO ''/oracle/auxfiles/aux_4.f'';
  59. -
  60. CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR;
  61. CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR;
  62. CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR;
  63. CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;
阅读(812) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~