Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle Recovery Manager (RMAN) 10g : Reloaded

Similar presentations


Presentation on theme: "Oracle Recovery Manager (RMAN) 10g : Reloaded"— Presentation transcript:

1

2 Oracle Recovery Manager (RMAN) 10g : Reloaded
Boris Gurov Support Engineer Oracle Bulgaria

3 Agenda What is Recovery Manager? Automatic disk based recovery
Optimized incremental backups Incrementally updated backups Just say no to shrinking backup windows A new twist to transportable tablespaces Q&A

4 Recovery Manager: Oracle’s Backup & Recovery Utility
Over 25 Man Years of Engineering Technology provides: Intimate knowledge of database file formats and recovery procedures Manages and automates the backup, restore, and recovery process Creates and maintains backup policies Catalogs all backup and recovery activities Operates on-line and in parallel for fast processing Corrupt block detection during backup and restore and the ability to validate backups Integrated with Enterprise Manager & 3rd party network backup products Recovery Manager Enterprise Manager & 3rd Party Tools Media Management Layer Network

5 New World: Disk Based Data Recovery
Disk economics are close to tape Disk is better than tape Random access to any data We rearchitected our recovery strategy to take advantage of these economics Random access allows us to backup and recover just the changes to the database Backup and Recovery goes from hours to minutes 1980’s MB 1000x increase Traditional Recovery was designed 15 years ago Log files capture all changes Backup database & logs to tape nightly Recover by restoring backups and applying logs Traditional recovery is slow Restore time depends on DB size Roll forward time depends on time since last backup Times measured in hours 2000’s GB

6 Flash Recovery Area Unified storage location for all recovery files and recovery related activities in an Oracle Database. Centralized location for control files, online redo logs, archive logs, flashback logs, backups A flash recovery area can be defined as a directory, file system, or ASM disk group A single recovery area can be shared by more than one database Minimize the number of initialization parameters to set when you create a database Define a database area and flash recovery area location Oracle creates and manages all files using OMF The flash recovery area is a unified storage location for all recovery related files and activities in an Oracle database. All files that are needed to completely recover a database from a media failure are part of the flash recovery area. The 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, LOG_ARCHIVE_DEST_10 is automatically set to the flash recovery area location. The Archiver background process then creates archived files in the flash recovery area and in other configured LOG_ARCHIVE_DEST_n locations. If no LOG_ARCHIVE_DEST_n locations are defined, then the default for archived files is in the flash recovery area. Flashback logs: Flashback must be enabled to generate flashback logs. Control file autobackups: The default location for control file autobackups created by RMAN and autobackups generated by the Oracle database server is the flash recovery area. Data file copies: The BACKUP AS COPY command creates data file copies in the flash recovery area. RMAN files: The default location for RMAN to create files during backup, copy, tablespace-point-in-time recovery (TSPITR) (archivelogs only), and restore (archivelogs only), recover commands (archivelogs only) is the flash recovery area. Database Area Flash Recovery Area

7 Flash Recovery Area Space Management
Disk limit is reached and a new file needs to be written into the Flash Recovery Area Oracle delete files that are no longer required on disk. Archive Logs & Database File Backups Flash Recovery Area Space Pressure occurs Warning Issued to user 1 RMAN updates list of files that may be deleted 2 Each time RMAN creates a file into the flash recovery area, the list of files that are no longer required on disk, is updated. When the flash recovery area experiences space pressure or low on free space because there are no files that can be deleted from the flash recovery area, you are warned that there is a danger of running out of disk space. The Oracle database server and RMAN continue to create files in the flash recovery area until 100% of the disk limit is reached. Thus when setting the DB_RECOVERY_FILE_DEST_SIZE, you must consider whether you have allocated enough disk space before running out of space or backup to tape. Files that are obsolete or have been backed up to tape are likely candidates for deletion to provide for free space. When files are written into the flash recovery area and space is needed for that file, the Oracle database deletes a file that is on the obsolete files list. When a file is written and deleted from the flash recovery area, notification is written into the alert log. Note: When flash recovery area used space is at 85% a warning is issued and when used space is at 97%, a critical warning is issued. These are internal settings and cannot be changed. A sample alert log output follows: WARNING: db_recovery_file_dest_size of bytes is % used, and has 0 remaining bytes available. You can issue the following query to determine the action to take: SQL> select object_type, message_type, message_level, 2> reason, suggested_action Backup Files to be deleted

8 Benefits to Using a Flash Recovery Area
Unifies the storage location of related recovery files Manages the disk space allocated for recovery files automatically Simplifies database administrator tasks Much faster backup Much faster restore Much more reliable due to inherent reliability of disks Disk files that were created by components such as Recovery Manager (RMAN) and the ARCH process in previous versions had no knowledge of one another or the sizes of the file system on which the files were created. By allocating a storage location and unifying related recovery files within a specific area, the Oracle database server relieves the database administrator from having to manage the disk files created by these components. Note: The flash recovery area is also supported by Data Guard. For further details, please refer to Oracle Database 10g: Maximize Availability - Data Guard Enhancements eStudy.

9 Change Tracking File Optimizes incremental backups
Track which blocks have changed since last backup Integrated change tracking file Changed blocks are tracked as redo is generated RMAN backup automatically uses changed block list Flash Recovery Area Oracle Database 10g allows you to create a block change tracking file that records the blocks modified since the last backup. RMAN uses the tracking file to determine which blocks to include in the incremental backup. Change Tracking File

10 The Size of the Change Tracking File
Approximately 1/ of the total size of the database Depends on the number of the threads in RAC environment Depends on the number of the old backups (max 8 backups are tracked) The size of the block change tracking file is proportional to: • Database size in bytes: The block change tracking file contains data representing every data file block in the database. The data is approximately 1/ of the total size of the database. • The number of enabled threads: All Real Application Clusters (RAC) instances have access to the same block change tracking file, however, the instances update different areas of the tracking file without any locking or inter-node block swapping. You enable block change tracking for the entire database and not for individual instances. • The number of old backups: The block change tracking file keeps a record of all changes between previous backups, in addition to the modifications since the last backup. The tracking file retains the change history for a maximum of eight backups. If the tracking file contains the change history for eight backups then the Oracle database overwrites the oldest change history information. For example, a 500GB database, with only one thread, and having eight backups kept in the RMAN repository requires a block change tracking file of 20MB. Note: The minimum size for the block change tracking file is 10MB.

11 Enabling Block Change Tracking
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING [USING FILE ‘/oracle/u101/changetrack/o1_mf_yzczmrr7_.chg‘]; The Change Tracking Writer (CTWR) process v$block_change_tracking view STATUS FILE BYTES

12 Incremental Backup and Changed Tracking File Benefits
Faster – Optimizes incremental backups to only backup those changed blocks directly – Integrated with DB recovery and logging Better – Uses less space since changes are tracked per block group – RAC enabled Simpler Automatically integrates with backup and recovery – zero effort  In previous releases of the Oracle database when you back up the database using incremental backups, RMAN had to examine the entire data file to determine which blocks had changed. Therefore, the time that RMAN takes to perform an incremental backup is proportional to the size of the data files involved in the backup. The block change tracking file enables RMAN to make the incremental backup time proportional to the amount of content modified since the last backup.

13 Incrementally Updated Backups
RMAN incremental backup Incrementally Updated Backups RMAN RECOVER COPY OF DATAFILE In Oracle Database 10g, you can use RMAN to apply incremental backups to data file image copies. With this recovery method, you can use RMAN to recover a copy of a data file, that is, roll forward (recover) the image copy to the specified point in time by applying the incremental backups. The benefits of applying incremental backups to data file image copies are: • Reduce the time required for media recovery • No need for you to perform a full image copy after incremental backups To apply an incremental backup to an image data file copy RMAN requires the incremental backup files from before the image data file copy until the time at which you want to stop the recovery process. If there is more than one version of an image copy recorded in the RMAN catalog then RMAN automatically uses the latest version of the image copy. The command to perform this operation is: RECOVER COPY OF DATAFILE <datafile# or datafile name> RMAN> RECOVER COPY OF DATAFILE 10 Initiate Merge 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.

14 Eliminate Shrinking Backup Window Syndrome!
Fully automatic disk based backup and recovery Set it and Forget it Nightly incremental backup rolls forward recovery area backup Changed blocks are tracked in production DB Full scan is never needed Dramatically faster (20x) Blocks validated to prevent corruption of backup copy Use low cost disk array for recovery area Database Area Nightly Apply Validated Incremental Flash Recovery Area Weekly Archive To Tape Two Independent Disk Systems

15 Oracle Suggested Strategy
Easy & Reliable Integrates the Oracle DB 10g features Fast Recovery Options Backup and Recovery goes from hours to minutes

16 Automated Disk Based Backup & Recovery Benefits
Much faster backup Just propagate changes to recovery area Dramatic difference for large databases Much faster restore Copy backup files from the Flash Recovery Area Or simply use the copy in the Flash Recovery Area Much more reliable due to inherent reliability of disks Tapes not needed for normal backup/recovery, only for archiving

17 Backup Management List RMAN backups Perform maintenance
View files included in a backup set Perform maintenance Remove obsolete backups with a single click

18 What is Transportable Tablespace?
Mechanism to quickly move a tablespace across Oracle databases Most efficient means to move bulk data between databases. File is simply copied at OS level OS copy File 1 File 2 expdat.dmp 24

19 Oracle10g Cross Platform Transportable Tablespace
Solaris (SPARC) Open VMS (Intel IA64) Windows (Intel IA32/64) Linux (Intel IA32/64) AIX (PowerPC) HP-UX (PA-RISC) Tru64 UNIX (Alpha) HP-UX (Intel IA64) Small Endian Platforms Big Endian Platforms Simple File Copy Within These High Speed File Convert RMAN

20 Cross Platform Transportable Tablespace Benefits
Fast data distribution in Data Warehousing environment (data marts) Used for publishing structured data (i.e. catalogs on CDs) Sharing of read only tablespaces by heterogeneous systems Allowing a database to be migrated from one platform to another

21 Creating Compressed Backups
Compression of archive logs and backupses using LZ based approach The compressed backupset is not be usable with pre– Oracle Database 10g RMAN> BACKUP COMPRESSED BACKUPSET DATABASE; RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;

22 Other Oracle10g Backup & Recovery Enhancements
Restore tolerates missing or corrupt backup Automatically fails over to previous backup Automated recovery through a previous point in time recovery Recovery through resetlogs Fully automated tablespace point-in-time recovery Automatic channel failover on backup or restore Time window based throttling of backups Tablespace Rename Drop Database

23 & Resources Q U E S T I O N S A N S W E R S
HA OTN: RMAN Discussion Forum otn.oracle.com MetaLink MetaLink.oracle.com & Q U E S T I O N S A N S W E R S

24


Download ppt "Oracle Recovery Manager (RMAN) 10g : Reloaded"

Similar presentations


Ads by Google