Automatic configuration of three--rman for the concise tutorial of Rman

Source: Internet
Author: User

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 ';
One, backup strategy to maintain
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.
second, 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
Rate limit of Read
Allocate channel ... rate = integer
Maximum Backup slice size limit
Allocate channel ... maxpiecesize = integer
Maximum number of concurrent open files (default 16)
Allocate channel ... maxopenfile = integer
third, the 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 ';
Iv. setting up parallel backups
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.
V. Configure default IO device types
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;

Vi. 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 ';
vii. Backup optimization
You can set up optimizations for backups in the configuration, such as
CONFIGURE BACKUP optimization on;
If the optimization setting is turned on, an optimization algorithm is run on the backed-up data file, archive log, or backup set. Same dbid, checkpoint scn,resetlogscn with time normal off-line, read-only or normally closed file log, same thread, serial number Resetlog SCN with time
viii. format of backup files
Backup files can be customized in a variety of formats, as follows
Number of copies of%c backup slice
%d database name
%d The day ordinal of the month (DD)
%m in the month ordinal of the year (MM)
%F a unique name based on dbid, the form of this format is C-IIIIIIIIII-YYYYMMDD-QQ,
Where IIIIIIIIII for the database of DBID,YYYYMMDD for the date, QQ is a 1-256 order
Column
%n database name, fill to the maximum eight characters to the right
%u a eight-character name represents the backup set and the creation time
%p number of backup slices in this backup set, starting from 1 to the number of files created
%u a unique file name that represents%u_%p_%c
Number of the%s backup set
%t Backup set Timestamp
%T Month-day format (YYYYMMDD)

Recommended Oracle Community: HTTP://WWW.PDMCN.COM/BBS, Oracle QQ Group: 60632593, 60618621

Oracle Technical Materials recommended: Oracle 9i Rman Reference Manual, oracle10g backup and restore,Oracle Database 10gRMAN Backup and Recovery

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.