Recovery Manager (RMAN)
Recovery Manager (RMAN)
Rating:
Database recovery plays a very critical, crucial role in the management of a database. The recovery manager (RMAN) is an Oracle utility that provides an easy way to recover the database. The RMAN was originally introduced in Oracle 8i. Gradually, it has been improved with the increase in demand for database recovery on a large scale. RMAN is used to manage backup and recovery operations. Recovery Manager can back up database files (data files, control files, and archived redo log files) and restore or recover a database by using a backup.
Recovery Manager uses a central information repository called Recovery Catalog in order to store metadata (data about data) about backup and recovery operations. However, if a Recovery Catalog is not created, Recovery Manager uses the target database's (the database that RMAN is backing up or restoring) control file as a repository for storing the information necessary for backup and recovery operations.
Recovery Manager can be invoked as a command line utility from the operating system command prompt. However, its few features can also be used through Oracle Enterprise Manager GUI. The RMAN is available in the following two versions:
- Graphical User Interface (GUI)
- Command-line Interface
The Recovery Catalog is the central place for storing RMAN recovery information of databases. The Recovery Catalog supports multiple databases, which helps in centralizing the recovery information. RMAN supports the logging of the backup and recovery information in the catalog. The Recovery Catalog contains the following:
- RMAN scripts
- Information about the schema of the target database
- Backup and recovery information.
- Backup information about archive logs and data files.
The Enterprise Manager (EM) is Graphical User Interface (GUI) utility of Oracle. It is used to configure the RMAN settings. It provides better services, low operation costs, and greater agility to users. It is a systems management tool for managing Oracle database. It provides tools for automating tasks. The users can better manage their application with Oracle 10g. It enables them to monitor services levels to isolate business exceptions proactively. The settings for RMAN can be configured through an Internet browser by the following Uniform Resource Locator (URL):
In the above URL, the hostname is the server and the domain name is the network on which the user is working. The default port number of the first database with Enterprise Manager (EM), is 5500, which is incremented by 1 for each additional database.
RMAN can be configured to backup the control file and server parameter files automatically. Whenever any information that affects control file, is changed, the RMAN automatically backups that. This constitutes a marked feature of recovery management because it allows for database recovery even in the case of loss of the control file or the server parameter file. Due to the common naming method of the SPFILE and the control file, the RMAN can search and restore these files without searching the RMAN repository. The RMAN repository is available after the restoration of the control file and then RMAN can use the information for restoring the datafiles and archive logs.
Image copies are the copies of the datafiles or archived redo log files. These copies can be made by RMAN or operating system commands. Backup sets are the copies of datafiles or archived redo log files. These copies are readable only by RMAN. These copies consist of one or more than one physical files. There is a provision for more space saving when using backup sets by the use of a compression algorithm designed specifically for the type of data that is found in an oracle datafile. Moreover, an image copy can be copied to a disk location whereas a backup set can be written to disk or a secondary storage device such as tape.
The image copies are copies of control files, database files, and archive logs. The special feature of image copies is that they can be stored only on the disk and not in RMAN format. This image copy is equivalent to the copy command in Windows therefore, in case of recovery situation no RMAN restore processing is required to make image copies usable. This results in an improved restore and recovery operation. However, this is not without a price as the image copies cannot be compressed and the space required by the image copies is much more than a backup set.
Oracle 10g has the feature of compression, which is a marked improvement over the previous versions. In the previous versions, the used data blocks could not be compressed but only the unused data blocks were left out when a backup was taken. So, this was not compression in its real sense. But with Oracle 10g, the used data blocks can be compressed as well. In this method, compression is done independent of the contents of the datablocks. These backups do not work with image copies but only with backup sets.
A full backup involves all the data blocks whereas incremental backup involves a partial backup. Full backup means that all the data blocks in a database are backed up regardless of its contents whereas an incremental backup involves a limited backup in the sense that it backs that data which has changed since last backup. There are five levels of backups, from 0 to 4. A 0 level backup is a full backup. The baseline backup is level 0 backup, which means the next backup in future is against the level 0 backup. Therefore, it results in faster or quicker backups as there is no need to take the whole backup but only the changes made from the previous backup are recorded.
If the backup is taken at the same or at a lower level it is called differential incremental backup whereas a cumulative incremental backup is that for which only one backup for a given level is required for restoration. It is faster than differential backup but it takes more space than differential backup.
Parallelization includes multiple backing up of the database on many backup sets or channels. This is achieved by allocating multiple channels for backup sets. These settings or configurations can be modified for more than one channel.
There are many options provided by RMAN for the backup process. The BACKUP command with the FORMAT and TAG parameter handles the control filenames options. The backup I/O bandwidth usage is limited by the RATE option. This results in saving of resources during backup. The DURATION option determines the time after which the backup process is terminated. The options MAXSIZE and MAXPIECESIZE control the sizes.
The Block Change Tracking method is an improvement in Oracle 10g over the previous versions. It includes a file, where only the changed data blocks since the last backup are stored. This file is called Block Change Tracking File. This dramatically reduces the search time for RMAN, as it does not have to scan all the datafiles. Although, scanning a smaller database might be easy but a larger database takes significant amount of time in searching all the datafiles. So, this was a significant improvement over the earlier releases.
The monitoring of the backup or recovery can be done through dynamic views. The RMAN features of REPORT, LIST, or SHOW commands do not provide all the information provided by the dynamic views. The dynamic views is accessed through SQL*Plus.
The RMAN is used to perform backups. The backup can be performed by GUI or command-line interface. The backup can be a whole database backup consisting of every database block or partial backup consisting of only those data blocks that were changed from the previous backup. There has been significant improvement in every backup method provided by RMAN as compared with the earlier versions. Now backup sets can be compressed so that the least resources are used.
Rating:
Other articles
- OCP 1z0-045 Short Notes: Exam passing tips
- What is Data Guard?
- What is Globalization Development Kit (GDK) ?
- What is an ASM instance?
- What is the V dynamic performance view?
