Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1011590
  • 博文数量: 584
  • 博客积分: 2293
  • 博客等级: 大尉
  • 技术积分: 3045
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-28 11:15
文章分类

全部博文(584)

文章存档

2012年(532)

2011年(47)

2009年(5)

我的朋友

分类:

2012-03-08 21:35:32

原文地址:备份集维护相关 作者:hxl

1.将obsolete的备份集保留一段时间,使其可用(report obsolete不再列出该备份集).
使用change backupset命令
  1. RMAN> report obsolete;
  2. RMAN retention policy will be applied to the command
  3. RMAN retention policy is set to recovery window of 2 days
  4. Report of obsolete backups and copies
  5. Type Key Completion Time Filename/Handle
  6. -------------------- ------ ------------------ --------------------

  7. Backup Set 5 21-DEC-11
  8.   Backup Piece 29 21-DEC-11 /u01/rman_backup/2011/201111/mybak/df_768589674_6_1.bak
  9. Backup Set 6 21-DEC-11
  10.   Backup Piece 30 21-DEC-11 /u01/rman_backup/2011/201111/mybak/df_768589733_7_1.bak

  11. RMAN> CHANGE backupset 5 KEEP UNTIL TIME 'SYSDATE+180' nologs;

  12. using channel ORA_DISK_1
  13. keep attributes for the backup are changed
  14. backup will be obsolete on date 18-JUN-12
  15. archived logs required to recover from this backup will not be kept
  16. backup set key=5 recid=5 stamp=768589725


  17. RMAN> CHANGE backuppiece '/u01/rman_backup/2011/201111/mybak/df_768589733_7_1.bak' KEEP UNTIL TIME 'SYSDATE+180' nologs;

  18. using channel ORA_DISK_1
  19. RMAN-00571: ===========================================================
  20. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  21. RMAN-00571: ===========================================================
  22. RMAN-03002: failure of KEEP command at 12/21/2011 15:09:39
  23. RMAN-06528: CHANGE ... KEEP not supported for BACKUPPIECE

从最后一个change backuppiece命令报错误可用看出,change keep命令不支持backuppiece.相关change命令

change datafilecopy '/tmp/control01.ctl' unavailable;
change copy of archivelog sequence between 1000 and 1012 unavailable;
change backupset 12 unavailable;
change backup of spfile tag "tag20020208t154556" unavailable;
change datafilecopy '/tmp/system01.dbf' available;
change backupset 12 available;
change backup of spfile tag "tag20020208t154556" available;

 

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