zoukankan      html  css  js  c++  java
  • 删除使用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
  • 相关阅读:
    parse_str — 将字符串解析成多个变量
    HTTP 协议入门
    Ruby自动文档工具 RDoc 3.3 发布 狼人:
    用好IE9浏览器必须要知道的九件事 狼人:
    微软缘何认为VB与C#需要异步语法 狼人:
    微软资深软件工程师:阅读代码真的很难 狼人:
    20款Web应用:可以替代桌面软件 狼人:
    互联网公司完善商业模式需完成七件事情 狼人:
    改良程序需要的11个技巧 狼人:
    开源网站建设工具Drupal 7发布 狼人:
  • 原文地址:https://www.cnblogs.com/arcer/p/2977278.html
Copyright © 2011-2022 走看看