The concept and architecture of Oracle Rman (iii) automatic configuration of Rman

Source: Internet
Author: User
Tags backup

Oracle 9i can configure a number of parameters such as channels, backup retention policies, and so on, can be used more than once, and the information in the settings does not affect the reset in the script. RMAN default configuration parameters, which can be seen by show all.

Rman> Show All;

RMAN configuration parameters are:

CONFIGURE RETENTION POLICY to redundancy 1;

CONFIGURE BACKUP optimization off;

CONFIGURE DEFAULT DEVICE TYPE to DISK;

CONFIGURE Controlfile autobackup off;

CONFIGURE controlfile autobackup FORMAT for TYPE DISK to '%F ';

CONFIGURE DEVICE TYPE DISK PARALLELISM 1;

CONFIGURE datafile BACKUP copies for DEVICE TYPE DISK to 1;

CONFIGURE Archivelog BACKUP copies for DEVICE TYPE DISK to 1;

CONFIGURE maxsetsize to unlimited;

CONFIGURE SNAPSHOT Controlfile NAME to

'/u01/app/oracle/product/9.0.2/dbs/snapcf_u02.f ';

3.1 Backup policies remain

More Wonderful content: http://www.bianceng.cn/database/Oracle/

There are two retention policies, one is the time policy, which determines that at least one backup can be restored to a specified date, a redundancy policy that requires at least several redundant backups.

CONFIGURE RETENTION POLICY to RECOVERY windows of 5 days;

CONFIGURE RETENTION POLICY to redundancy 5;

CONFIGURE RETENTION POLICY to NONE;

In the first policy, it is guaranteed that at least one backup can be restored to the Sysdate-5 point of time, and that the previous backup will be marked as obsolete. The second strategy describes the need for at least three redundant backups to exist, and if more than three backups will be marked as redundant. NONE can invalidate the backup retention policy, and clear will revert to the default retention policy.

3.2 channel configuration and automatic channel allocation

The automatically allocated channel is configured through configure, and a number can be used to specify different channel allocations.

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/oracle/backup/%u '

CONFIGURE CHANNEL n DEVICE TYPE DISK FORMAT '/u01/oracle/backup/%u '

Of course, you can also specify channel allocations manually in the run block, which replaces the default channel allocation.

run{

Allocate channel CQ type disk format= '/u01/backup/%u.bak '

......

}

Here are some features of the channel

(1) Rate limit of Read

Allocate channel ... rate = integer

(2) Maximum backup slice size limit

Allocate channel ... maxpiecesize = integer

(3) Maximum number of concurrent open files (default 16)

Allocate channel ... maxopenfile = integer

3.3 Control File Automatic backup

Starting with 9i, you can configure automatic backups of the control files, but this setting is invalidated on the standby database. You can set up automatic backups of control files by using the following command

CONFIGURE Controlfile autobackup on;

This feature is particularly effective for backup strategies that do not have a recovery directory, and the automatic backup of control files occurs after any backup or copy command, or after any database structure changes.

You can specify the backup path and format of the control file using the following configuration

CONFIGURE controlfile autobackup FORMAT for TYPE DISK to '%F ';

During the backup, a snapshot of the control file is generated to control the read consistency of the file, which can be configured with the following

CONFIGURE SNAPSHOT Controlfile NAME to

'/u01/app/oracle/product/9.0.2/dbs/snapcf_u02.f ';

3.4 Setting up a parallel backup

Rman supports parallel backup and recovery, or it can specify the default degree of parallelism in the configuration. Such as

CONFIGURE DEVICE TYPE DISK PARALLELISM 4;

Specifies that in future backup and recovery, the degree of parallelism will be 4 and 4 channels should be turned on for backup and recovery, or the channel can be specified in the run block to determine the level of parallelism between backup and recovery. The number of parallel numbers determines the number of open channels. If a channel configuration is specified, the specified channel is used and the default channel configuration is used if no channel is specified.

3.5 Configuring the default IO device type

The IO device type can be either a disk or a tape and, by default, a disk, which can be reconfigured by using the following command.

CONFIGURE DEFAULT DEVICE TYPE to DISK;

CONFIGURE DEFAULT DEVICE TYPE to SBT;

Note that if an IO device is changed, the corresponding configuration also needs to be modified, as

rman> CONFIGURE DEVICE TYPE SBT PARALLELISM 2;

3.6 Configure the number of copies of multiple backups

If you feel that a single backup set is not reassuring, you can set up copies of multiple backup sets, such as

CONFIGURE datafile BACKUP copies for DEVICE TYPE DISK to 2;

CONFIGURE Archivelog BACKUP copies for DEVICE TYPE DISK to 2;

If multiple copies are specified, you can specify multiple copy locations in the channel configuration or backup configuration

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/backup/%u ', '/u02/backup/%u ';

Rman>backup datafile N format '/u01/backup/%u ', '/u02/backup/%u ';

3.7 Backup Optimization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.