Oracle Database rman environment configuration details

Source: Internet
Author: User

Last time we introduced:OracleExamples of Common Database rman commands. This article introduces the Oracle databaseRman environment ConfigurationNext, let's take a look at this part!

1. Configure Automatic Channels

Configure Automatic channel concurrency. RMAN automatically allocates two channels:

 
 
  1. RMAN> configure device type disk parallelism 2;  
  2. RMAN> configure device type sbt parallelism 2; 

Configure the backup file format for all channels

 
 
  1. RMAN> configure channel device type disk  
  2. 2> format '/oracle/10g/oracle/bakup/%d_%s_%p.bak'; 

Configure the format of the backup file for a specific channel. Configure the format of the backup file for Channel 1:

 
 
  1. RMAN> configure channel 1 device type disk  
  2. 2> format '/oracle/10g/oracle/bakup/%u.bak'; 

Configure the default storage device

 
 
  1. RMAN> configure default device type to sbt; -- tape
  2. RMAN> configure default device type to disk; -- disk

2. Configure the maximum size of the Backup set and backup slice.

 
 
  1. RMAN> configure maxsetsize to 1G;  
  2. RMAN> configure channel device type disk maxpiecesize 500M; 

By default, each backup set contains only one backup slice file. By configuring the maximum size of the backup slice, you can divide a large backup set into several smaller backup slice files.

3. Configure backup Optimization

Backup optimization is used to skip the backup of a specific file in some cases. If a backup with the same file already exists, the file will be skipped when backup optimization is activated. Backup optimization is only applicable to the backup database, backup archivelog all/like, and backup backupset all commands. Activate backup optimization: RMAN> configure backup optimization on;

4. Configure multiple backups

By default, rman generates a backup copy. You can configure multiple backups. Example:

 
 
  1. RMAN> configure datafile backup copies for device type disk to 3; 

5. Configure to exempt tablespaces

 
 
  1. RMAN> configure exclude for tablespace testspc; 

6. Configure Backup Redundancy policies

Delete obsolete is used to delete obsolete backups. An example of configuring a Backup Redundancy policy is as follows:

 
 
  1. RMAN> configure retention policy to redundancy 2; 

7. Configure the data file name of the auxiliary routine

It is used for rman to restore or copy the database at the tablespace execution time point. Example:

 
 
  1. RMAN> configure auxname for datafile 2 to '/oracle/10g/data/df_2.dbf'; 

8. Configure the snapshot control file name

When the directory or backup control file is restored synchronously, rman needs to create a snapshot control file.

 
 
  1. RMAN> show snapshot controlfile name;
  2. RMAN configuration parameters are:
  3. Configure snapshot controlfile name to '/oracle/10g/oracle/product/10.2.0/db_1/dbs/snapcf_oralife.f'; # default -- default
  4. RMAN> configure snapshot controlfile name to '/oracle/10g/oracle/product/10.2.0/db_1/dbs/snapcf_oralife_test.f ';
  5. Snapshot control file name set to:/oracle/10g/oracle/product/10.2.0/db_1/dbs/snapcf_oralife_test.f
  6. New RMAN configuration parameters are successfully stored
  7. RMAN> show snapshot controlfile name;
  8. RMAN configuration parameters are:
  9. Configure snapshot controlfile name to '/oracle/10g/oracle/product/10.2.0/db_1/dbs/snapcf_oralife_test.f ';

9. Display rman Configuration

Display all rman environment configurations: RMAN> show all;

Display default device type: RMAN> show default device type;

Display automatic channel configuration: RMAN> show channel for device type disk/sbt;

Display the Backup Redundancy policy: RMAN> show retention policy;

Display backup optimization: RMAN> show backup optimization;

Display snapshot control file: RMAN> show snapshot controlfile name;

Display the maximum backup set size: RMAN> show maxsetsize;

Show multiple backups:

 
 
  1. RMAN> show datafile backup copies; -- displays multiple backups of data files
  2. RMAN> show archivelog backup copies; -- displays multiple backups of archived logs.

10. Clear rman Configuration

Clear the rman configuration using the clear option, for example:

 
 
  1. RMAN> configure retention policy clear;  
  2. old RMAN configuration parameters:  
  3. CONFIGURE RETENTION POLICY TO REDUNDANCY 2;  
  4. RMAN configuration parameters are successfully reset to default value  
  5. RMAN> show retention policy;  
  6. RMAN configuration parameters are:  
  7. CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default  

The Oracle Database rman environment configuration is introduced here. I hope this introduction will help you.

Related Article

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.