删除使用RMAN命令备份的文件

1、列举出已经备份过的备份集

RMAN>  list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    1.05G      DISK        00:00:43     19-MAR-13
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20130319T154228
        Piece Name: /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_nnndf_TAG20130319T154228_8nj5q5sd_.bkp
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1194625    19-MAR-13 /u01/oradata/poli/system01.dbf
  2       Full 1194625    19-MAR-13 /u01/oradata/poli/sysaux01.dbf
  3       Full 1194625    19-MAR-13 /u01/oradata/poli/undotbs01.dbf
  4       Full 1194625    19-MAR-13 /u01/oradata/poli/users01.dbf
  5       Full 1194625    19-MAR-13 /u01/oradata/poli/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    9.33M      DISK        00:00:02     19-MAR-13
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20130319T154228
        Piece Name: /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_ncnnf_TAG20130319T154228_8nj5ro16_.bkp
  Control File Included: Ckp SCN: 1194643      Ckp time: 19-MAR-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    9.33M      DISK        00:00:01     19-MAR-13
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20130319T155246
        Piece Name: /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_ncnnf_TAG20130319T155246_8nj6bhrd_.bkp
  Control File Included: Ckp SCN: 1194878      Ckp time: 19-MAR-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.33M      DISK        00:00:03     21-MAR-13
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20130321T182034
        Piece Name: /u01/flash_recovery_area/POLI/autobackup/2013_03_21/o1_mf_n_810670834_8noqqnd0_.bkp
  Control File Included: Ckp SCN: 1253212      Ckp time: 21-MAR-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.07G      DISK        00:01:20     23-MAR-13
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20130323T151740
        Piece Name: /u01/arcerzhang/poli_05o58kok_1_1
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1330610    23-MAR-13 /u01/oradata/poli/system01.dbf
  2       Full 1330610    23-MAR-13 /u01/oradata/poli/sysaux01.dbf
  3       Full 1330610    23-MAR-13 /u01/oradata/poli/undotbs01.dbf
  4       Full 1330610    23-MAR-13 /u01/oradata/poli/users01.dbf
  5       Full 1330610    23-MAR-13 /u01/oradata/poli/example01.dbf
  6       Full 1330610    23-MAR-13 /u01/oradata/expimp01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.33M      DISK        00:00:00     23-MAR-13
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20130323T151909
        Piece Name: /u01/flash_recovery_area/POLI/autobackup/2013_03_23/o1_mf_n_810832749_8ntovfoq_.bkp
  Control File Included: Ckp SCN: 1330652      Ckp time: 23-MAR-13

 2、删除备份集1,2 

RMAN> delete backupset 1,2;

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1       1       1   1   AVAILABLE   DISK        /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_nnndf_TAG20130319T154228_8nj5q5sd_.bkp
2       2       1   1   AVAILABLE   DISK        /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_ncnnf_TAG20130319T154228_8nj5ro16_.bkp

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_nnndf_TAG20130319T154228_8nj5q5sd_.bkp RECID=1 STAMP=810488549
deleted backup piece
backup piece handle=/u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_ncnnf_TAG20130319T154228_8nj5ro16_.bkp RECID=2 STAMP=810488597
Deleted 2 objects

 3、查看删除之后的备份集结果信息

RMAN> list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    9.33M      DISK        00:00:01     19-MAR-13
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20130319T155246
        Piece Name: /u01/flash_recovery_area/POLI/backupset/2013_03_19/o1_mf_ncnnf_TAG20130319T155246_8nj6bhrd_.bkp
  Control File Included: Ckp SCN: 1194878      Ckp time: 19-MAR-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.33M      DISK        00:00:03     21-MAR-13
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20130321T182034
        Piece Name: /u01/flash_recovery_area/POLI/autobackup/2013_03_21/o1_mf_n_810670834_8noqqnd0_.bkp
  Control File Included: Ckp SCN: 1253212      Ckp time: 21-MAR-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.07G      DISK        00:01:20     23-MAR-13
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20130323T151740
        Piece Name: /u01/arcerzhang/poli_05o58kok_1_1
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1330610    23-MAR-13 /u01/oradata/poli/system01.dbf
  2       Full 1330610    23-MAR-13 /u01/oradata/poli/sysaux01.dbf
  3       Full 1330610    23-MAR-13 /u01/oradata/poli/undotbs01.dbf
  4       Full 1330610    23-MAR-13 /u01/oradata/poli/users01.dbf
  5       Full 1330610    23-MAR-13 /u01/oradata/poli/example01.dbf
  6       Full 1330610    23-MAR-13 /u01/oradata/expimp01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.33M      DISK        00:00:00     23-MAR-13
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20130323T151909
        Piece Name: /u01/flash_recovery_area/POLI/autobackup/2013_03_23/o1_mf_n_810832749_8ntovfoq_.bkp
  Control File Included: Ckp SCN: 1330652      Ckp time: 23-MAR-13

 

posted @ 2013-03-23 15:58  ArcerZhang  阅读(874)  评论(0编辑  收藏  举报