Friday , July 21 2017
Home / Oracle DBA / RECOVERY MANAGER (RMAN) ARCHITECTURE

RECOVERY MANAGER (RMAN) ARCHITECTURE

 RECOVERY MANAGER (RMAN) ARCHITECTURE

 RECOVERY MANAGER (RMAN) ARCHITECTURE

  1. RECOVERY MANAGER It is the backup methodology introduced in 8.0 which performs block level backup i.e RMAN will take the backup of only used blocks
  2. RMAN will take the information from bitmap block about used blocks and while performing this RMAN will make sure DBWRn is not writing into free blocks
  3. Advantages of RMAN

    1. Block level backup
    2. Parallelism
    3. Duplexing of archives
    4. Detection of corruption in datafiles
    5. Validating backup
    6. Incremental backup
    7. Recovery catalog etc
  4. Components of RMAN

    1. RMAN executable file
    2. Target database
    3. Auxiliary database
    4. Recovery catalog
    5. Media management layer – it is responsible in interacting with tape drive while taking RMAN backup directly to tape
  1. Archive log mode should be enabled to take RMAN backup
  2. Current control file and sp file will be backed up only when system tablespace is included in the backup
  3. During restore and recovery RMAN will read the control file for getting the file size and location
  4. Whenever archive destination is full, database will hang. In such scenarios, do following
    1. If time permits take the backup of archives using delete input clause
    2. If time doesn’t permits temporarily move archivelogs to some other mount point
    3. If no mount point having free space then delete the archives and take full backup of the database without fail immediately
    4. When we delete either backup or archives from OS level, we can make RMAN understand this by running
      1. RMAN> crosscheck backup;
      2. RMAN> crosscheck archivelog all;
    5. RMAN will delete obsolete backup automatically if the backup location is flash recovery area
  5. RMAN configuration parameters

    1. RETENTION POLICY – tells till what date our backup will be stored which we can use for recovery. It has 2 values
      1. Redundancy – it will tell how many backups to be retained
      2. Recovery window – it will tell how many day’s backup to be retained
    2. BACKUP OPTIMIZATION – it will avoid taking backup of unmodified datafile
    3. CONTROLFILE AUTOBACKUP – includes control file in the backup
    4. PARALLELISM – creates multiple processes to speed up backup
    5. ENCRYPTION – to secure the backup
    6. ARCHIVELOG DELETION POLICY – deletes archivelogs automatically based on this

COMMANDS

# To connect to RMAN

[oracle@server1 ~]$ rman target /

# To see configuration parameter values

RMAN> show all;

# To change any configuration parameter

RMAN> configure retention policy to redundancy 5;

# To backup the database

RMAN> backup database;
# To backup archivelogs
RMAN> backup archivelog all;
# To backup both database and archivelogs
RMAN> backup database plus archivelog;
Note: By default in 10g, rman backup will go to flash recovery area. To override that, use below command.
# To take compressed backup
RMAN> backup as compressed backupset database plus archivelog;
# To take backup to specified area
RMAN> backup format=’/u03/rmanbkp/fulldbbkp_%t.bkp’ database;
# To see backup information
RMAN> list backup;
The above command will get the information from control file of the database
# To find & delete expired backups
RMAN> crosscheck backup;
RMAN> delete expired backup;
RMAN> delete noprompt expired backup;
# To find and delete expired archivelogs
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
RMAN> delete noprompt expired archivelog all;
# To find and delete unnecessary backups
RMAN> report obsolete;
RMAN> delete obsolete;
RMAN> delete noprompt obsolete;
# To take physical image copy of database
RMAN> backup as copy database;
# To validate the backup
RMAN> restore database validate;
# To validate the database before backup
RMAN> backup validate database archivelog all;
# To validate a particular backupset
RMAN> validate backupset 1234;
# To take backup when using tape
RMAN> run
             {
                allocate channel c1 device type sbt_tape;
                backup database plus archivelog;
             }
# To specify duration during backup
RMAN> backup duration 5 database;
The above command will run backup for 5 hours and will pause after that. It will continue on next day at scheduled time
# To increase FRA size
SQL> show parameter db_recovery_file_dest_size
SQL> alter system set db_recovery_file_dest_size=10G scope=both;
View More:
PERFORMANCE TUNING INTERVIEW QUESTIONS
ORACLE DATABASE RMAN INTERVIEW QUESTIONS
ORACLE BACKUP and RECOVERY INTERVIEW QUESTIONS

Comments

comments

Check Also

DATA BASE LINKS

DATABASE LINKS: What are the db links? create a link from one database to another …

Leave a Reply

Your email address will not be published. Required fields are marked *