2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.

Slides:



Advertisements
Similar presentations
2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
RMAN Restore and Recovery
Oracle’s Backup and Recovery Tool
Configuring Recovery Manager
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
Chapter 5 Configuring the RMAN Environment. Objectives Show command to see existing settings Configure command to change settings Backing up the controlfile.
Backup & Recovery with RMAN
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
CHAPTER 17 Configuring RMAN. Introduction to RMAN RMAN was introduced in Oracle 8.0. RMAN is Oracle’s tool for backup and recovery. RMAN is much more.
The Oracle Recovery Manager (RMAN)
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
CHAPTER 18 RMAN Backups and Reporting. Introduction to RMAN Backups and Reporting The focus of this chapter is backups of: Datafiles Control files Archived.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
Backup Infrastructure – Additional Information Gordon D. Brown, RAL Carlos Fernando Gamboa, BNL 3D Workshop, CNAF, Bologna, Italy 13 th June 2007.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
Oracle Recovery Manager (RMAN) 10g : Reloaded
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
Backup and Recovery Protects From Data Loss. Backup and Recovery Protects From Data Loss Provides for Media Recovery.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
Chapter 9 Scripting RMAN. Background Authors felt that scripting was a topic not covered well Authors wanted to cover both Unix/Linux and Windows environments.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
10 Copyright © 2007, Oracle. All rights reserved. Using RMAN Enhancements.
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Recovery Manager Overview and Configuration
RMAN Maintenance.
Sharing experience on RMAN backups ...
Introduction.
RMAN Maintenance.
Recovery Catalog Creation and Maintenance
Configuring for Recoverability
Creating an Oracle Database
Performing Database Backups
Configuring Recovery Manager
Duplicating a Database
Using the RMAN Recovery Catalog
Index Index.
Configuring Backup Settings
Configuring for Recoverability
Performing Database Recovery
Presentation transcript:

2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager

2-2 Copyright © 2006, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe the RMAN repository and recovery catalog Describe the Media Management Library interface Configure database parameters that affect RMAN operations Connect to the three different types of databases by using RMAN Configure two types of retention policies Change RMAN default settings with CONFIGURE

2-3 Copyright © 2006, Oracle. All rights reserved. Backup and Recovery: Review The major backup and recovery–related topics covered in the Database Administration I Course are: Types of failure that can happen –Statement, session, instance, media, and so on How to configure ARCHIVELOG mode How to automate backups How to do incremental backups How to perform and tune instance recovery

2-4 Copyright © 2006, Oracle. All rights reserved. Features of Recovery Manager RMAN provides a flexible way to: Back up the database including data files, control files, and archived redo logs Manage backup and recovery tasks Perform incremental block-level backup and block-level media recovery Detect corrupted blocks during backup Use binary compression when creating backups

2-5 Copyright © 2006, Oracle. All rights reserved. Recovery Manager Features (notes only slide)

2-6 Copyright © 2006, Oracle. All rights reserved. Server session Channel Server session Enterprise Manager Recovery Manager Components Target database Recovery catalog database Auxiliary database Disk Flash recovery area Channel MML Options Recovery Manager (RMAN)

2-7 Copyright © 2006, Oracle. All rights reserved. Recovery Manager Components (notes only slide)

2-8 Copyright © 2006, Oracle. All rights reserved. Steps for Configuring RMAN 1.Determine the repository location: control file or recovery catalog. 2.Define database and environment variables. 3.Start RMAN and connect to the target and, optionally, the recovery catalog databases. 4.Configure persistent settings.

2-9 Copyright © 2006, Oracle. All rights reserved. RMAN Repository Data Storage: Comparison of Options Control file: –Simpler administration –Default Recovery catalog: –Replicates control file data –Has room for more data –Can service many targets –Can store RMAN scripts Metadata Backup set list Image copy list.

2-10 Copyright © 2006, Oracle. All rights reserved. RMAN Repository Data Storage: Comparison of Options (notes only slide)

2-11 Copyright © 2006, Oracle. All rights reserved. Backup Destinations Backups can be written to: Disk directory Media Management Library (tape device) –Typically used for disaster recovery, when disk backups are lost Flash recovery area –This is a disk area set aside for backup and recovery and flashback database purposes. –You define the location and the size. –Files are automatically named by using Oracle Managed Files. –Files are automatically retained and deleted as necessary.

2-12 Copyright © 2006, Oracle. All rights reserved. Media Management Recovery Manager Media management server software Media management library Server session (channel) Oracle Secure Backup with built-in MML Or

2-13 Copyright © 2006, Oracle. All rights reserved.

2-14 Copyright © 2006, Oracle. All rights reserved. Using a Flash Recovery Area with RMAN You can configure RMAN to use the flash recovery area. Database area RMAN backup process Flash recovery area DB_RECOVERY_FILE_DEST = '/u01/oracle/fra' DB_RECOVERY_FILE_DEST_SIZE = 2G

2-15 Copyright © 2006, Oracle. All rights reserved. Using a Flash Recovery Area with RMAN (notes only slide)

2-16 Copyright © 2006, Oracle. All rights reserved. Monitoring the Flash Recovery Area with EM

2-17 Copyright © 2006, Oracle. All rights reserved. Flash Recovery Area Space Usage Configure the retention policy to the minimum value appropriate for your database. Back up the archive log files regularly and delete the files upon completion of the backup. Use the RMAN REPORT OBSOLETE and DELETE OBSOLETE commands to remove backups and file copies that are not required.

2-18 Copyright © 2006, Oracle. All rights reserved. V$FLASH_RECOVERY_AREA_USAGE You can query V$FLASH_RECOVERY_AREA_USAGE to view the flash recovery area disk space usage. SQL> SELECT file_type, 2 percent_space_used AS used, 3 percent_space_reclaimable AS reclaimable, 4 number_of_files AS number 5 FROM v$flash_recovery_area_usage ; FILE_TYPE USED RECLAIMABLE FILES

2-19 Copyright © 2006, Oracle. All rights reserved. V$FLASH_RECOVERY_AREA_USAGE Output from the V$FLASH_RECOVERY_AREA_USAGE query FILE_TYPE USED RECLAIMABLE FILES CONTROLFILE ONLINELOG ARCHIVELOG BACKUPPIECE IMAGECOPY FLASHBACKLOG

2-20 Copyright © 2006, Oracle. All rights reserved. Backing Up the Flash Recovery Area RMAN> BACKUP RECOVERY FILES;

2-21 Copyright © 2006, Oracle. All rights reserved. Benefits of Using a Flash Recovery Area Using the flash recovery area for recovery-related files: Simplifies the location of database backups Automatically manages the disk space allocated for recovery files Does not require changes to existing scripts Puts database backups, archive logs, and control file backups in the flash recovery area

2-22 Copyright © 2006, Oracle. All rights reserved. Setting Parameters That Affect RMAN Database initialization parameters – CONTROL_FILE_RECORD_KEEP_TIME – DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE, if using the flash recovery area Environment variables – NLS_DATE_FORMAT – NLS_LANG

2-23 Copyright © 2006, Oracle. All rights reserved. Setting Parameters that Affect RMAN (notes only slide)

2-24 Copyright © 2006, Oracle. All rights reserved. RMAN Usage Considerations Resources: Shared memory, more processes Privileges given to users: –Database: SYSDBA –Operating system: Access to devices Remote operations: –Set up the password file –Ensure that the password file is backed up

2-25 Copyright © 2006, Oracle. All rights reserved. Connection Types with RMAN Target database Recovery catalog DB Auxiliary database Recovery Manager

2-26 Copyright © 2006, Oracle. All rights reserved. Starting RMAN Starting RMAN locally Starting RMAN remotely UNIX:$ ORACLE_SID=DB01; export ORACLE_SID $ rman target / rman target Windows NT:C:\> set ORACLE_SID=DB01 C:\> rman target /

2-27 Copyright © 2006, Oracle. All rights reserved. Additional RMAN Command-Line Arguments Writing RMAN output to a log file Executing a command file when RMAN is invoked Establishing database connections on RMAN startup $ rman TARGET sys/oracle CMDFILE=$HOME/scripts/my_rman_script.rcv $ rman TARGET sys/oracle LOG=$HOME/oradata/u03/rman.log APPEND $ rman TARGET CATALOG

2-28 Copyright © 2006, Oracle. All rights reserved. Configuring Persistent Settings for RMAN RMAN is preset with default configuration settings Use the CONFIGURE command to: –Configure automatic channels –Specify the backup retention policy –Specify the number of backup copies to be created –Set the default backup type to BACKUPSET or COPY –Limit the size of backup sets –Exempt a tablespace from backup –Enable and disable backup optimization –Configure automatic backups of control files

2-29 Copyright © 2006, Oracle. All rights reserved. Configuring RMAN Settings by Using EM

2-30 Copyright © 2006, Oracle. All rights reserved. Control File Autobackups RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; Best practice: Oracle recommends that you enable control file autobackup.

2-31 Copyright © 2006, Oracle. All rights reserved. Control File Autobackups (notes only page)

2-32 Copyright © 2006, Oracle. All rights reserved. A retention policy describes which backups will be kept and for how long. There are two types of retention policies: –Recovery window: Establishes a period of time within which point-in-time recovery must be possible –Redundancy: Establishes a fixed number of backups that must be kept These policies are mutually exclusive and can be set with the CONFIGURE command. Retention Policies Now Seven-day retention File1File2 File2 needs to be backed up:

2-33 Copyright © 2006, Oracle. All rights reserved. Retention Policies (notes only page)

2-34 Copyright © 2006, Oracle. All rights reserved. Managing Persistent Settings Use the SHOW command to list current settings: Use the CLEAR command to reset any persistent setting to its default value: RMAN> SHOW CONTROLFILE AUTOBACKUP FORMAT; RMAN> SHOW EXCLUDE; RMAN> SHOW ALL; RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR; RMAN> CONFIGURE MAXSETSIZE CLEAR; RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR;

2-35 Copyright © 2006, Oracle. All rights reserved. Channel Allocation Channel (DISK) BACKUP RESTORE RECOVER Server session Server session Target database Channel (SBT) RMAN

2-36 Copyright © 2006, Oracle. All rights reserved. Automatic and Manual Channel Allocation An automatic channel is one that is preconfigured and used for subsequent commands. To change the default device type for automatic channel allocation, use: A manually allocated channel is one that overrides the automatic channel setting. This channel overrides the automatic channel for this run block: RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt; RMAN> RUN { 2> ALLOCATE CHANNEL c1 DEVICE TYPE disk; 3> BACKUP DATAFILE '/u01/oradata/user01.dbf'; 4> }

2-37 Copyright © 2006, Oracle. All rights reserved. Channel Control Options Configure parallelism: Specify the maximum backup piece size: Format the name of generated backup files: RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3; RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK 2> MAXPIECESIZE 2G; RMAN> RUN { 2> ALLOCATE CHANNEL d1 DEVICE TYPE DISK 3> FORMAT '/disk1/backups/%U'; 4> BACKUP DATABASE PLUS ARCHIVELOG; }

2-38 Copyright © 2006, Oracle. All rights reserved.

2-39 Copyright © 2006, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Use either the control file or a recovery catalog for the RMAN repository Change RMAN default settings with CONFIGURE Use the flash recovery area for RMAN operations Monitor the flash recovery area by using v$ views and Enterprise Manager Implement recovery window and redundancy retention policies Implement manual and automatic channel allocation

2-40 Copyright © 2006, Oracle. All rights reserved. Practice Overview: Configuring RMAN This practice covers the following topics: Using Recovery Manager to connect to a target database in default NOCATALOG mode Displaying the default RMAN configuration settings Configuring control file autobackups Altering the backup retention policy for a database