ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN Delete

RMAN Delete

原创 Linux操作系统 作者:liu_qingwei2008 时间:2011-04-28 16:41:38 0 删除 编辑

RMAN Delete

Delete backups (and copies) from disk or tape, and update the RMAN repository.

Syntax:

   DELETE [FORCE] [NOPROMPT] 
    { [EXPIRED] 
     { 
       { BACKUP [OF listObjectList]
       | COPY   [OF listObectjList] 
       | archivelogRecordSpecifier
       } [maintQualifier [maintQualifier]...]
     | recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
     }
   | OBSOLETE [obsOperandList]
     [DEVICE TYPE (deviceSpecifier [, deviceSpecifier]...]
   };

 obsOperandList::=
     [ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS | ORPHAN ]... 

 recordSpec::=
      { { BACKUPPIECE | PROXY } 
        { 'media_handle' [, 'media_handle']... 
        | primary_key [, primary_key]... 
        | TAG [=] ['] tag_name [']
        }
      | BACKUPSET primary_key [, primary_key]...
      | { CONTROLFILECOPY | DATAFILECOPY }
        { { primary_key [, primary_key]... 
          | 'filename' [, 'filename']...
          } 
        | TAG [=] ['] tag_name ['] [, ['] tag_name [']]...
        }
      | ARCHIVELOG
        { primary_key [, primary_key]... 
        | 'filename' [, 'filename']...
        }
      }

 listObjectList::=
   [ DATAFILE datafileSpec [, datafileSpec]... 
   | TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]... 
   | archivelogRecordSpecifier 
   | DATABASE [SKIP TABLESPACE ['] tablespace_name ['] 
     [, ['] tablespace_name [']]...] 
   | CONTROLFILE
   | SPFILE
   ]...

Examples

 RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt;
 RMAN> CROSSCHECK BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
 RMAN> DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
 RMAN> DELETE BACKUP OF DATABASE LIKE '/tmp%';
 RMAN> DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
 RMAN> DELETE BACKUPSET 101, 102, 103;
 RMAN> DELETE CONTROLFILECOPY '/tmp/cntrlfile.copy';
 RMAN> DELETE BACKUP OF SPFILE TABLESPACE users DEVICE TYPE sbt;

Delete backups and copies (and archived redo logs ) that will not be needed to perform. any possible recovery of the database to any point in the last 7 days.
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS;

"Rejection is the greatest aphrodisiac" - Madonna

Related Commands:

CHANGE - Update the status of a backup in the RMAN repository.
CONFIGURE
- Persistent RMAN settings.
CROSSCHECK
- Check whether backup items still exist.
LIST - List backups and copies
REPORT - Report backup status: database, files, backups
SET - Settings for the current RMAN session.
SHOW
- Display the current configuration

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-694027/,如需转载,请注明出处,否则将追究法律责任。

上一篇: RMAN LIST
下一篇: RMAN Report Clause
请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    37
  • 访问量
    86630