0% found this document useful (0 votes)
29 views14 pages

TWP Ha Rmanoverview 10g 111503

Uploaded by

adineagu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views14 pages

TWP Ha Rmanoverview 10g 111503

Uploaded by

adineagu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Oracle Recovery Manager 10g

An Oracle White Paper November 2003

Oracle Recovery Manager 10g

EXECUTIVE OVERVIEW

A backup of the database may be the only means you have to protect the Oracle database from a media failure. The importance of recovering critical data is self evident with the numerous tools and methods provided to DBAs. The cost and complexity of protecting the Oracle data ranges from the simple weekly backups to tape to the more involved file snapshots or standby databases. Each tool and option provides their own bnefits of continual availability and a fast backup and/or recovery of the Oracle database. The method or tool that you employ to protect and recover your data, should provide: reliability. All files that are required for recovery are backed up and can be easily restored for recovery operations. flexibility. The Oracle database can be backed up or restored at the database, tablespace, datafile, and block level. manageability. The backup files are organized and managed so they are available for restore operations. availability. A backup operation should not interfere with database transaction processing and the recovery operation should be fast and efficient.

Oracles Recovery Manager (RMAN) continues to mature with each new release and the revolutionary technological advances included in Oracle Database 10g will provide the simple, reliable, and automatic recovery tool that you have been waiting for. This paper presents the new Oracle Database 10g features that simplify the implementation and on-going maintenance of your Oracle data protection strategy.

RECOVERY MANAGER (RMAN)

RMAN is Oracles utility to manage the backup, and more importantly the recovery, of the database. It eliminates operational complexity while providing

Oracle Recovery Manager 10g

Page 2

superior performance and availability of the database. Recovery Manager debuted with Oracle8 to provide DBAs an integrated backup and recovery solution.

Recovery Manager determines the most efficient method of executing the requested backup, restore, or recovery operation and then executes these operations in concert with the Oracle database server. Recovery Manager and the server automatically identify modifications to the structure of the database and dynamically adjust the required operation to adapt to the changes.
Recovery Manager determines the most efficient method of executing the requested backup, restore, or recovery operation and then executes these operations in concert with the Oracle database server.

Oracle Database 10g Recovery Manager feature set revolutionize the recovery of critical Oracle data out of the box. At no extract cost or additional install, RMAN manages the backup and recovery of the Oracle database files. Since RMAN is tightly integrated with the Oracle kernel, it provides the insight and wisdom to efficiently recover your Oracle databases.

Oracle Database 10g RMAN provides new advanced features such as Flash Recovery Area organizes and manages recovery related files. Optimized Incremental Backups directly backs up only the changed blocks for a backup. Incremental Updated Backups merges database image copies and incremental backups to provide fast and efficient database recovery. Enterprise Manager and RMAN provides point and click backup and recovery wizards.

Lets examine these new features in more detail.

Flash Recovery Area

Your money today purchases more disk space than 5 years ago or even 1 year ago. While you may only need a few Gig of disk space to meet your current storage needs, the sheer size of disks may provide you with the luxury of unused storage. Making a backup to disk is faster since you are eliminating the tape-write bottleneck. But more importantly, if database media recovery is required, then your datafile backups are readily available. Restore and recovery operation time is reduced since you dont need to find a tape and a free tape device to restore the needed datafiles and archive logs.

Oracle Recovery Manager 10g

Page 3

Allocating sufficient space to the Flash Recovery Area will ensure faster, simpler, and automatic recovery of the Oracle database.

The Flash Recovery Area is a unified storage location for all recovery related files and activities in an Oracle database. By defining one init.ora parameter, all RMAN backups, archive logs, control file autobackups, and datafile copies are automatically written to a specified file system or Automatic Storage Management (ASM) Disk Group.

DB_RECOVERY_FILE_DEST = /oracle/flash_recovery_area

Allocating sufficient space to the Flash Recovery Area will ensure faster, simpler, and automatic recovery of the Oracle database. Your recovery time objective is now dependent on the amount of free space to which you can allocate to recovery related files. Some studies have shown that 95% of most recovery operations only require 3 days worth of backups. So, if you have the disk space to maintain 3 days of database backups and archive logs, the required backup will be locally available. A system administrator will not be required to retrieve a tape or free up a tape device to restore required backup files.

The Flash Recovery Area manages the files on disk. By configuring the RMAN RETENTION POLICY, the Flash Recovery Area will automatically delete obsolete backups and archive logs that are no longer required based on that configuration. If you set the RETENTION POLICY to a recovery window of 7 days, then RMAN will retain all backups required to recover the database 7 days in the past. If enough disk space is set aside for all of the recovery files, then you only need to backup to tape to meet your off-site disaster recovery and long-term archival requirements.

Oracle Recovery Manager 10g

Page 4

All files that are needed to completely recover a database from a media failure are part of the Flash Recovery Area. Those recovery related files include: Control file: A copy is created in the Flash Recovery Area location at database creation. Archived log files: When the Flash Recovery Area is configured, the archiver background process then creates archived files in the Flash Recovery Area and in other configured LOG_ARCHIVE_DEST_n locations. Flashback logs: the Flash Recovery Area automatically manages Flashback Database logs. For more information on Flashback Database, consult the Oracle Advanced Backup and Recovery documentaion. Control file autobackups: The default location for control file . Data file copies: The default location for data file copies created by RMAN is stored in the Flash Recovery Area. RMAN backups: The default location for RMAN to create files during backup & copy operations. It is also the default location to restore archive logs from tape if they are required during a recover task.

The Flash Recovery Area can be configured to use an ADM Disk Group. ASM eliminates the need for manual performance tuning.

Automatic Storage Management

Oracle10g provides DBAs a simplified management interface for storage resources. Automatic Storage Management (ASM) eliminates the need for manual performance tuning. It groups physical storage into a set of virtual disks that provide redundancy options to enable a high level of protection. ASM facilitates non-intrusive storage allocations and provides automatic rebalancing. It spreads database files across all available storage to optimize performance and resource utilization. It saves DBAs time by automating manual tasks and increase the ability to manage larger databases and more of them with increased efficiency.

The Flash Recovery Area can be configured using ASM. Backups are protected automatically because ASM is designed to tolerate failures and automatically remirror when a disk or array fails. In addition, ASM prevents non-Oracle process from overwriting or corrupting your files used for recovery. For more information on ASM, consult the Oracle Database Administration documentation.

The Flash Recovery Area provides: Unified storage location of related recovery files Management of the disk space allocated for recovery files Simplified database administration tasks

Oracle Recovery Manager 10g

Page 5


Oracle tracks the physical location of all database changes. RMAN automatically uses the change tracking file to determine which blocks need to be backed up.

Much faster backup Much faster restore Much more reliable due to inherent reliability of disk

Optimized Incremental Backups

Incremental backups have been part of RMAN since it was first released in Oracle8.0. Incremental backups provide the capability to backup only the changed blocks since the previous backup. Oracle Database 10g delivers the ability for faster incrementals with the implementation of the change tracking file feature.

When you enable block change tracking, Oracle tracks the physical location of all database changes. RMAN automatically uses the change tracking file to determine which blocks need to be read during an incremental backup and directly accesses that block to back it up. When block change tracking is not enabled, then the entire datafile is read during each incremental backup to find and backup only the changed blocks, even if just a very small part of that file has changed since the previous backup. Use the following command to enable block change tracking.

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

By making incremental backups and the change tracking file part of your backup strategy you can reduce the amount of time needed for daily backups. save network bandwidth when backing up over a network. recover UNLOGGED changes to database. For example, when the NOLOGGING option is used with direct load, inserts do not create redo log entries and their changes cannot be applied with media recovery. Incremental backups capture the changed block images and can be used for recovery. reduce the backup file storage. Depending on the number of updated blocks and the frequency of backups, an incremental backup will be smaller than a full database backup and consumes less storage. enable fast backups of changed blocks.

Oracle Recovery Manager 10g

Page 6

Incrementally Updated Backups

Oracles Database 10g Incrementally Updated Backups feature merges the image copy of a datafile with a RMAN incremental backup. The resulting image copy is now updated with the block changes captured by the incremental backup. The merging of the image copy and incremental backup is initiated with the RMAN RECOVER command. It occurs in the background and does not require a database instance.

Oracle has eliminated the requirement to make a whole database backup with the ability to continually update datafile image copies with the latest incremental backup.

Shrinking backup windows are no longer an issue. Oracle has eliminated the requirement to make a whole database backup with the ability to continually update the datafile image copies with the latest incremental backup. A backup strategy based on incrementally updated backups can help you keep the time required for media recovery of your database to a minimum. RMAN restores the incrementally updated image copy of your database, and only needs to apply the archive logs generated since the last backup. Time required for media recovery is now a function of how often you create the incremental backup and apply it to the image copy.

Applying incremental backups to data file image copies eliminates the need to perform a whole database backup. reduces the time required for media recovery since the image copy is updated with the latest block changes.

Oracle Recovery Manager 10g

Page 7

Enterprise Manager and RMAN

Enterprise Manager 10g utilizes the new RMAN features to make database recovery more efficient. To enable the Flash Recovery Area, EnterpriseManager provides a GUI interface to indicate the location on disk and the disk quota. This functionality resides in the Configure Recovery Settings link.

Enterprise Manager 10g provides new backup and recovery wizards to easily configure your database recovery strategy.

The Oracle Suggested Strategy

A backup solution utilizing the Flash Recovery Area, Incremental Backups, and Incrementally Updated Backups provides fast and easy recovery for the Oracle database. The Enterprise Manager Backup Wizard delivers the mechanism to configure and schedule database backups. The backup wizard prompts you to configure the Flash Recovery Area so that all RMAN backups and archive logs will be written to the specified directory. determine the optimal time that a backup should be run on your host. Usually the backup is scheduled when the lowest user activity is running.

Oracle Recovery Manager 10g

Page 8

review and confirm the backup time. Enterprise Manager will submit the backup job to run each night at the same time.

For each datafile, the Oracle Suggested Strategy calls for backups to be made as follows: o At the beginning of day 1 of the strategy (the time the first scheduled job actually runs), an incremental level 0 datafile copy backup. It contains the datafiles contents at the beginning of day 1. In a restore-and-recovery scenario, the redo logs from day 1 can be used to recover to any point during day 1. At the beginning of day 2, an incremental level 1 backup is created, containing the blocks changed during day 1. In a restore-and-recovery scenario, this incremental level 1 can be applied to quickly recover the rolled-forward level 0 backup to the beginning of day 2, and redo logs can be used to recover to any point during day 2. At the beginning of each day n for days 3 and onwards, the level 1 backup from the beginning of day n-1 is applied to the level 0 backup. This brings the datafile copy to its state at the beginning of day n-1. Then, a new level 1 is created, containing the blocks changed during day n-1. In a restore-and-recovery scenario, this incremental level 1 can be applied to quickly recover a restored backup to the beginning of day n, and redo logs can be used to recover the database to any point during day n.

This strategy is completely automated by Enterprise Manager. You can implement the suggested strategy on your own by simply running the following two RMAN commands during each backup window:

RECOVER COPY OF DATABASE WITH TAG oracle_strategy; BACKUP INCREMENTAL LEVEL 0 DATABASE FOR RECOVER OF COPY WITH TAG oracle_strategy; Enterprise Manager 10g provides the ability to list and modify RMAN backups. You can view the RMAN backups, archive logs, control file backups, and image copies. If you select the link on the RMAN backup, it will display all files that are located in that backup.

Oracle Recovery Manager 10g

Page 9

Figure 1 Enterprise Manager Backup Management

More Oracle Database 10g Features..

While I have highlighted a few of the Oracle Database 10g recovery features in the last few pages, there is yet more functionality that provides enhanced backup and recovery capabilities.

Compression of RMAN backups. If disk space is a premium, then you can still reduce the time to recover the database by keeping compressed RMAN backups on disk. Uncompressing the backed up files is not necessary since the recovery operations can use the compressed backup files. Restore tolerates missing or corrupt backup. RMANs goal is to restore the database with all known backups. Ideally the last backup taken is used to completely recover the database. If the last backup is unavailable, then RMAN will automatically determine the next valid backup that can be used for recovery.

Automated recovery through a previous point in time recovery. It is sometimes necessary to recover your database to a previous point in time, then open it with the RESETLOGS option. Prior to Oracle 10g, if the database was damaged after the resetlogs, but before taking another full backup, so that you need to recover using the last backup taken before the resetlogs, the recovery process would be complicated and error-prone. In 10g, Oracle recovery transparently handles the case where some datafiles have been restored from backups that were taken prior to a RESETLOGS open.
Fully automated tablespace point-in-time recovery. RMAN provides a single command to recover a tablespace to a point in time in the past. This

Oracle Recovery Manager 10g

Page 10

operation is completely automatic and at the end of the recovery, the tablespace is available for use. Automatic channel failover on backup or restore. How many times have you almost finished a backup or restore operastion and the last file is has not completed its operation because the channel stopped due to an error? RMAN will finish the work on any other allocated channels and then automatically continue to complete the operation. Tablespace Rename. In some cases, tablespaces share the same tablespace name, especially if they have be cloned. With cross-platform transportable tablespace capability, it becomes much easier to move data around at the tablespace level. The rename tablespace capability provides the ability to make tablespaces more portable. Drop Database. If you regularly create databases for testing and qualification purposes, you know that after you are done using the temporary database, you need to delete the files that belong to that database. Otherwise, your disk becomes full of orphaned datafiles. A new RMAN DROP DATABASE command provides the process to delete all database files from the OS.

RMAN Vs. User Managed Recovery

Recovery Manager provides efficient recovery of the Oracle database. But many DBAs continue to use their homegrown scripts to perform the backup and recovery operations. The table below compares RMAN with User Managed common recovery operations.

Operation Lost datafile

Recovery Manager Steps Offline the datafile and/or tablespace. RMAN Restores the datafile backup. RMAN recovers the datafile while automatically restore any required archive logs. Online the datafile and/or tablespace

User Managed Steps Find a backup, preferably the latest backup. If it is on tape, request the file to be restored. Offlline the datafile and/or tablespace Issue the recover datafile command. If any archive logs are required, restore them. Apply the archive logs that are required by the recover command Online the datafile and/or tablespace

Oracle Recovery Manager 10g

Page 11

Repair corrupted block

blockrecover block_number

export data The data in the corrupted block is lost unless you can extract it from a standby database or previous backup. It is also very difficult to extract any table data beyond the corrupted block, even if just one block is corrupt import the table data Create an init.ora file for the temporary database Restore the backups for System, Undo, Users, Tools. Recover required archive logs needed for recovery Mount the temporary database and recover until July 7, 2003. Using the Data Pump facilities, extract data dictionary data so that Users and Tools tablespaces can be plugged into the database. Plug the Users and Tools tablespaces into the production database. Delete the temporary database files that were restored for the TSPITR operation. Create a create control file script that includes all database files and online logs. Run the script to create

Tablespace point-in-time recovery RECOVER TABLESPACE users, tools UNTIL TIME July 7, 2003;

Loss of all online controlfiles

RESTORE CONTROLFILE;

Oracle Recovery Manager 10g

Page 12

the control file. Note: all RMAN backups and archived log information is lost. Validate Backups Restore database validate; Cant perform it because there is no tool available.

CONCLUSION

Database backups are the insurance to recover critical data. Oracle Database 10g provides the mechanism to organize and manage recovery related files in the Flash Recovery Area. It eliminates the need to manually track locations of backups and deletes them when they are no longer required for recovery. RMAN provides the ability to directly read the changed blocks since the previous backup utilizing the new Change Tracking File functionality. Using the Oracle Database 10g technological advancements and Enterprise Manager, implementing a recovery strategy to meet your recovery time objectives is now achievable.

The method or tool that you employ to protect and recover your data, should provide: reliability. RMAN. flexibility. RMAN. manageability. RMAN. availability. RMAN. It all starts with Oracle Database 10g!

Oracle Recovery Manager 10g

Page 13

Oracle Recovery Manager 10g November 2003 Author: Tammy Bednar Contributing Authors: Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 www.oracle.com Copyright 2003, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

You might also like