In Oracle : Oracle RMAN Configuration

Oracle Applications EBS 11i, R12      Oracle Database      Data Warehouse & BI      Oracle Middleware      PL/SQL      Linux ...

Oracle DBA

Real Application Cluster (RAC) Maintenance tasks Backup and Recovery Database Architecture Replication Oracle Performance Tuning Oracle DBA - Other articles Oracle scripts/ Selects for DBA Oracle Errors (ORA-nnnnn)

The last articles in the site (HOT)

The most visited articles in the site

In-Oracle.com  -> Oracle DBA -> Oracle Database Backup and Recovery

-> RMAN Configuration

 

 RMAN Configuration

 

 

1. Which is the default RMAN configuration ?

2. How could I restore the actual configuration to the default value ?

3. Using substitution variables

4. Configure RETENTION POLICY

5. Configure DEFAULT DEVICE TYPE

6. Configure CONTROLFILE AUTOBACKUP

1. Which is the default RMAN configuration ?

 

show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/10gOHome/dbs/snapcf_db10.f'; # default

NOTES: 

  • The parameters which are currently modified are in bold.  

  • The changes in the RMAN configuration are saved automatically in the control file/ RMAN catalog.

 

2. How could I restore the actual configuration to the default value ?

 

CONFIGURE RETENTION POLICY CLEAR

CONFIGURE BACKUP OPTIMIZATION CLEAR

CONFIGURE DEFAULT DEVICE TYPE CLEAR

CONFIGURE CONTROLFILE AUTOBACKUP CLEAR;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT CLEAR

CONFIGURE DEVICE TYPE DISK CLEAR

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK CLEAR

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT CLEAR

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK CLEAR

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT CLEAR

CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR

CONFIGURE CHANNEL DEVICE TYPE SBT CLEAR

CONFIGURE MAXSETSIZE CLEAR

CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR;

 

 

3. Using substitution variables

 

RMAN can make use of substitution variables in creating format strings to generate UNIQUE file names. If the file names are not unique the files will be overwritten and the data will be lost.

 

Format Description
%d specifies the database name.
%u specifies an 8-character name constituted by compressed representations of the backup set number and the time the backup set was created.
%p specifies the backup piece number within the backup set. This value starts at 1 for each backup set and is incremented by 1 as each backup piece is created.
%c Specifies the copy number of the backup piece within a set of duplexed backup pieces. If you did not issue the set duplex command, then this variable will be 1 for regular backup sets and 0 for proxy copies. If you issued set duplex, the variable identifies the copy number: 1, 2, 3, or 4.
%U Specifies a convenient shorthand for %u_%p_%c that guarantees uniqueness in generated backup filenames. If you do not specify a format, RMAN uses %U by default. 
%t specifies the backup set timestamp. The combination of %s and %t can be used to form a unique name for the backup set.
%s specifies the backup set number. This number is a counter in the control file that is incremented for each backup set. The counter value starts at 1 and is unique for the lifetime of the control file. If you restore a backup control file, then duplicate values can result. Also, CREATE CONTROLFILE initializes the counter back to 1.

 

 

4. Configure RETENTION POLICY

 

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;

>> After 30 days the backup will become OBSOLETE. 

 

CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

>> The latest 3 backups will NOT be OBSOLETE. The others will be. 

 

When configuring a retention policy, RMAN will NOT cause backups to be automatically deleted.

 

REPORT OBSOLETE; -> List the backups (on disk) that have become obsolete with the current retention policy.

DELETE OBSOLETE; -> Delete the obsolete backup files.

delete noprompt obsolete;

 

NOTES:

  • crosscheck backup;  -> check if the backup files exist physically on the disk

  • crosscheck copy;  -> check if the files of a copy operation exist physically on the disk

  • list backup;    -> To list all backup sets, backup pieces

  • list expired backup;  -> To identify those backups that were not found during a crosscheck

  • DELETE EXPIRED BACKUP; -> To delete the information about the expired backups in the RMAN repository

  • DELETE EXPIRED COPY; -> To delete the information about the expired copies in the RMAN repository

 

5. Configure DEFAULT DEVICE TYPE

 

CONFIGURE DEFAULT DEVICE TYPE TO DISK;   --> by default

CONFIGURE DEFAULT DEVICE TYPE TO SBT;

 

This is overridden by the RUN command, or by DEVICE TYPE on the BACKUP command itself. 

 

 

6. Configure CONTROLFILE AUTOBACKUP (starting from 9i)

 

CONFIGURE CONTROLFILE AUTOBACKUP ON; 

CONFIGURE CONTROLFILE AUTOBACKUP OFF;  --> by default

 

RMAN writes both the CONTROLFILE and the SPFILE (if the database was started with an SPFILE) to the same backup piece.

 

To set the location of the Control file backup:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/RMAN_backup/%F';

The %F tag is essential for RMAN to be able to restore the file without a recovery catalog.

 

 

In-Oracle.com  -> Oracle DBA -> Oracle Database Backup and Recovery

-> RMAN Configuration

Oracle Applications EBS 11i, R12      Oracle Database      Data Warehouse & BI      Oracle Middleware      PL/SQL      Linux ...

 

     Copyright (c) 2011-2015  www.in-oracle.com  |  Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk.