9 Copyright © Oracle Corporation, 2001. All rights reserved. Oracle Recovery Manager Overview and Configuration.

Slides:



Advertisements
Similar presentations
18 Copyright © Oracle Corporation, All rights reserved. Transporting Data Between Databases.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Database Backup and Recovery
RMAN Restore and Recovery
Backup and Recovery Part 1.
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.
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.
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
7 Copyright © 2006, Oracle. All rights reserved. Dealing with Database Corruption.
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.
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.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
12 Copyright © 2009, Oracle. All rights reserved. Managing Backups, Development Changes, and Security.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
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.
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.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Oracle Recovery Manager Overview and Configuration
RMAN Maintenance.
Sharing experience on RMAN backups ...
Using Recovery Manager
Introduction.
RMAN Maintenance.
Recovery Catalog Creation and Maintenance
Creating an Oracle Database
Configuring Recovery Manager
Duplicating a Database
Configuring Backup Settings
Performing Database Recovery
Presentation transcript:

9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration

Copyright © Oracle Corporation, All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify the features and components of RMAN Describe the RMAN repository and control file usage Describe channel allocation Describe the Media Management Library interface Connect to RMAN without the recovery catalog Configure the RMAN environment

Copyright © Oracle Corporation, All rights reserved. Recovery Manager Features RMAN provides a flexible way to: Back up the database, tablespaces, datafiles, control files, and archive logs Store frequently executed backup and recovery operations Perform incremental block-level backup Skip unused blocks Specify limits for backups

Copyright © Oracle Corporation, All rights reserved. Recovery Manager Features RMAN provides a flexible way to: Detect corrupted blocks during backup Increase performance through: –Automatic parallelization –Generation of less redo –Restricting I/O for backups –Tape streaming Manage backup and recovery tasks

Copyright © Oracle Corporation, All rights reserved. Recovery Manager (RMAN) Server session (default) Server session (polling) Server session (channel) MML Server session (channel) Target database Server session (rcvcat) Recovery catalog DB Enterprise Manager Recovery Manager Components Disk

Copyright © Oracle Corporation, All rights reserved.

Using the Backup Management Wizards

Copyright © Oracle Corporation, All rights reserved. RMAN Repository: Using the Control File RMAN repository is metadata about target database and backup and recovery operations. RMAN repository is always stored in the control file of the target database. CONTROL_FILE_RECORD_KEEP_TIME determines the minimum age in days of a record before it can be overwritten. The control file can grow in size.

Copyright © Oracle Corporation, All rights reserved. Channel Allocation RMAN Channel (disk) Server Session Channel (sbt) Server Session Target database Disk

Copyright © Oracle Corporation, All rights reserved.

Automatic Channel Allocation Change the default device type: Configure parallelism for automatic channels: Configure automatic channel options: RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3; RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt; RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK 2> FORMAT = ‘/BACKUP/RMAN/%U'; RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK 2> MAXPIECESIZE 2G;

Copyright © Oracle Corporation, All rights reserved. Channel Allocation Using OEM

Copyright © Oracle Corporation, All rights reserved. Manual Channel Allocation BACKUP, COPY, RESTORE, and RECOVER commands require at least one channel. Allocating a channel starts a server process on the target database. Channels affect the degree of parallelism. Channels write to different media types. Channels can be used to impose limits. RMAN> RUN { 2> ALLOCATE CHANNEL c1 TYPE disk 3> FORMAT = '/db01/BACKUP/usr0520.bak'; 4> BACKUP DATAFILE '/db01/ORADATA/users01.dbf';}

Copyright © Oracle Corporation, All rights reserved.

Media Management Recovery Manager Oracle server session Media management server software Tape library or single tape Media management library

Copyright © Oracle Corporation, All rights reserved.

Types of Connections with RMAN Target database Recovery catalog database Auxiliary database –Standby database –Duplicate database –TSPITR instance

Copyright © Oracle Corporation, All rights reserved. Connecting Without a Recovery Catalog Starting RMAN locally Starting RMAN remotely Server process (default) Server process (polling) UNIX: $ ORACLE_SID=DB01; export ORACLE_SID $ rman target / as sysdba Windows NT: C:\> set ORACLE_SID=DB01 C:\> rman target / as sysdba rman target Target database Recovery manager (RMAN)

Copyright © Oracle Corporation, All rights reserved.

Additional RMAN Command Line Arguments $ rman target sys/oracle log $HOME/ORADATA/u03/rman.log Writing RMAN output to a log file: Executing a command file when RMAN is invoked: $ rman target sys/oracle log $HOME/ORADATA/u03/rman.log append

Copyright © Oracle Corporation, All rights reserved. Recovery Manager Modes Interactive mode –Use it when doing analysis –Minimize regular usage –Avoid using with log option Batch mode –Meant for automated jobs –Minimize operator errors –Set the log file to obtain information

Copyright © Oracle Corporation, All rights reserved.

RMAN Commands RMAN commands are of the following types: Stand-alone –Executed only at the RMAN prompt –Executed individually –Cannot appear as subcommands within RUN Job –Must be within the brackets of RUN –Executed as a group Stand-alone or job

Copyright © Oracle Corporation, All rights reserved.

Job Command Example RUN command: RMAN> RUN { backup incremental level 0 format ‘/u01/db01/backup/%d_%s_%p’ fileperset 5 (database include current controlfile); sql ‘alter database archive log current’; }

Copyright © Oracle Corporation, All rights reserved. RMAN Configuration Settings 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 –Limit the size of backup sets –Exempt a tablespace from backup –Enable and disable backup optimization

Copyright © Oracle Corporation, All rights reserved. The CONFIGURE Command Configure automatic channels: Implement retention policy by specifying a recovery window: Implement retention policy by specifying redundancy: RMAN> CONFIGURE RETENTION POLICY TO RECOVERY 2> WINDOW OF 7 days; RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/db01/BACKUP/%U'; RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

Copyright © Oracle Corporation, All rights reserved. The CONFIGURE Command Configure duplexed backup sets: Configure backup optimization: Use the CLEAR option to return to the default value: RMAN> CONFIGURE RETENTION POLICY CLEAR; RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR; RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR 2> DEVICE TYPE disk TO 2; RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

Copyright © Oracle Corporation, All rights reserved. The SHOW Command Displays persistent configuration settings Use the SHOW command to display: –Automatic channel configuration settings –Backup retention policy settings –Number of backup copies to be created –Backup set size limit –Tablespace excluded from backups –Backup optimization status Use SHOW ALL to display all settings: RMAN> SHOW ALL;

Copyright © Oracle Corporation, All rights reserved. LIST Command Operations Lists backup sets and copies of datafiles Lists backup sets and copies of any datafile for a specified tablespace Lists backup sets and copies containing archive logs for a specified range

Copyright © Oracle Corporation, All rights reserved. The LIST Command List backups of all files in the database: List all backup sets containing the users01.dbf datafile: List all copies of datafiles in the SYSTEM tablespace: RMAN> LIST BACKUP OF DATAFILE 2> “/db01/ORADATA/u03/users01.dbf”; RMAN> LIST BACKUP OF DATABASE; RMAN> LIST COPY OF TABLESPACE “SYSTEM”;

Copyright © Oracle Corporation, All rights reserved. The REPORT Command Produces a detailed analysis of the repository Produces reports to answer: –Which files need a backup? –Which backups can be deleted? –Which files are unrecoverable?

Copyright © Oracle Corporation, All rights reserved. The REPORT NEED BACKUP Command Lists all datafiles requiring a backup Assumes the most recent backup is used during a restore Provides three options: –Incremental –Days –Redundancy Without options, takes into account the configured retention policy REPORT NEED BACKUP incremental 3; REPORT NEED BACKUP days 3; REPORT NEED BACKUP redundancy 3;

Copyright © Oracle Corporation, All rights reserved. Recovery Manager Packages Recovery Manager uses PL/SQL packages as its interface to: Target databases The recovery catalog Recovery Manager PL/SQL Recovery catalog dbms_rcvman dbms_rcvcat dbms_rcvman Target database Target control file dbms_backup_restore dbms_rcvman dbms_rcvcat dbms_rcvman

Copyright © Oracle Corporation, 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 Globalization environment variables Format used for the time parameters in RMAN commands

Copyright © Oracle Corporation, All rights reserved.

Summary In this lesson, you should have learned how to: Configure the RMAN environment Use automatic channel allocation Manually allocate channels Connect to RMAN without the recovery catalog Retrieve information from the RMAN repository

Copyright © Oracle Corporation, All rights reserved. Practice 9 Overview This practice covers the following topics: Using Recovery Manager to connect to a target database in default NOCATALOG mode. Obtaining information from the target database control file. Configuring a retention policy Using the SHOW command to display RMAN environment settings

Copyright © Oracle Corporation, All rights reserved.