美文网首页
Oracle数据库删除备份

Oracle数据库删除备份

作者: yahzon | 来源:发表于2019-12-09 15:03 被阅读0次
    1. 常规删除,删除过期备份:
    RMAN>  CROSSCHECK BACKUPSET;
    RMAN>   report obsolete;
    RMAN>    DELETE NOPROMPT OBSOLETE;
    
    1. 直接删除所有归档日志文件,不管是不是已经备份数据库
    list archivelog all; 
    delete archivelog all ;
    
    1. 自己删除备份,不管是不是超期
    RMAN> list backup of database;
    
    using target database control file instead of recovery catalog
    
    List of Backup Sets
    ===================
    
    
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    ------- ---- -- ---------- ----------- ------------ -------------------
    3       Full    6.35G      DISK        00:01:42     2019-09-25 20:22:33
            BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20190925T202051
            Piece Name: /home/oracle/05ucm213_1_1
      List of Datafiles in backup set 3
    
    

    上面命令得知备份集的key为3,删除备份集3:

     delete backupset 3;
    
    using channel ORA_DISK_1
    
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    ------- ------- --- --- ----------- ----------- ----------
    3       3       1   1   AVAILABLE   DISK        /home/oracle/05ucm213_1_1
    
    Do you really want to delete the above objects (enter YES or NO)?
    

    相关文章

      网友评论

          本文标题:Oracle数据库删除备份

          本文链接:https://www.haomeiwen.com/subject/ijibgctx.html