RMAN Configure Clause

RMAN Configure Clause

Change persistent RMAN configuration settings.

Syntax:

   CONFIGURE deviceConf;

   CONFIGURE backupConf;

   CONFIGURE AUXNAME FOR DATAFILE datafileSpec { TO 'filename' | CLEAR };

   CONFIGURE SNAPSHOT CONTROLFILE NAME { TO 'filename' | CLEAR };

   CONFIGURE cfauConf;

deviceConf::=
   { DEFAULT DEVICE TYPE { TO deviceSpecifier | CLEAR }
   | DEVICE TYPE deviceSpecifier { PARALLELISM integer | CLEAR }
   | [AUXILIARY] CHANNEL [integer] DEVICE TYPE deviceSpecifier
     { allocOperandList | CLEAR }
   }

allocOperandList::=
   { PARMS [=] 'channel_parms' 
   | FORMAT [=] 'format_string' [, 'format_string']...
   | { MAXPIECESIZE [=] integer | RATE [=] integer } [ K | M | G ] 
   .
   .
   .
   }...
connectStringSpec::=
   ['] [userid] [/ [password]] [@net_service_name] [']

backupConf::=
   { RETENTION POLICY { TO { RECOVERY WINDOW OF integer DAYS
                             | REDUNDANCY [=] integer
                             | NONE
                            }
                         | CLEAR
                      }
    | MAXSETSIZE { TO { integer [ K | M | G ]
                       | UNLIMITED
                      }
                  | CLEAR
                 }
    | { ARCHIVELOG | DATAFILE }
   BACKUP COPIES FOR DEVICE TYPE deviceSpecifier
   { TO integer | CLEAR }
    | BACKUP OPTIMIZATION { ON | OFF | CLEAR }
    | EXCLUDE FOR TABLESPACE tablespace_name [CLEAR]
   }

cfauConf::==
   CONTROLFILE AUTOBACKUP
   { ON
   | OFF
   | CLEAR
   | FORMAT FOR DEVICE TYPE deviceSpecifier { TO 'format string' | CLEAR }
   }

Examples

Show all configurable settings:

  RMAN>SHOW ALL;

Write disk backups to the /tmp directory:
(%U will be replaced with unique filenames)

  RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/tmp/%U';

Backup using a flash recovery area rather than disk

  RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT CLEAR;

Configure RMAN to back up the control file after each backup

   RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; 

By default, RMAN automatically names control file backups and stores them in the flash recovery area.
To configure RMAN to write control file backups to the /cfilebackups directory:
( %F will generate a unique filename)

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT 
         FOR DEVICE TYPE DISK TO '/cfilebackups/cf%F';

Ensure that RMAN retains all backups needed to recover the database to any point in time in the last 7 days:

  RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

Retain three backups of each datafile:

  RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

Delete backups no longer required by the retention policy:

  RMAN> DELETE OBSOLETE

To override the configured retention policy for individual backups - use BACKUP.. KEEP (or CHANGE.. KEEP)

Configure backups to run in parallel by assigning two sbt channels:

  RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 2;

Reset any CONFIGURE setting to its default by running the command with the CLEAR option

  RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR; 
  RMAN> CONFIGURE RETENTION POLICY CLEAR;

Unique filenames are:
DBID, day, month, year, and sequence number.

"The desire for safety stands against every great and noble enterprise" - Cornelius Tacitus

Related Commands:

BACKUP - Back up database files, archive logs, backups, or copies.
CROSSCHECK - Check whether backup items still exist.
RECOVER - Perform. media recovery from RMAN backups and copies.
RESTORE - Restore RMAN backups and copies.
RUN
- Some RMAN commands are only valid inside a RUN block.
SET
- Settings for the current RMAN session.
SHOW
- Display the current configuration

Related Views:

RMAN persistent configuration settings:
   RC_RMAN_CONFIGURATION   V$RMAN_CONFIGURATION 

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

转载于:http://blog.itpub.net/23898243/viewspace-694023/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值