Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.

Slides:



Advertisements
Similar presentations
ITEC474 INTRODUCTION.
Advertisements

1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
Chapter 20 Oracle Secure Backup.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
1 Chapter 15 Duplicating Databases and Transporting Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Database Backup and 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.
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.
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
Oracle Recovery Manager (RMAN) 10g : Reloaded
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
Your Interactive Guide to the Digital World Discovering Computers 2012.
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.
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.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
1 Week #10Business Continuity Backing Up Data Configuring Shadow Copies Providing Server and Service Availability.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
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.
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.
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.
3 Copyright © 2006, Oracle. All rights reserved. Installation and Administration Basics.
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.
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
Performing Tablespace Point-in-Time Recovery
Duplicating a Database
Index Index.
Configuring Backup Settings
Configuring for Recoverability
Presentation transcript:

Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session

Additional RMAN Features Operations With RMAN, DBAs can: Use encryption to secure backup sets Utilize unused block compression to minimize backup size and time Configure dynamic channel allocation for (Real Application Cluster) RAC environments With the Enterprise Manager Grid Control, manage backup jobs across all databases Use specified incremental backup to roll forward standby database

Unused Block Compression Oracle 10g, unlike previous Oracle releases, utilizes unused block compression. This means that it only backs up used blocks belonging to locally managed tablespaces. Unused blocks are not backed up, saving considerably on time and space.

Real Application Clusters ( RAC ) With Real Application Clusters ( RAC ), multiple low-cost computers can work together as a single large computer for database processing. When processing demands and the number of users increase, it is simple to add more RAC nodes. You can use RMAN to backup an RAC configuration by configuring specific nodes or using a single node.

Incremental Backups and Physical Standby Databases Incremental backups default to backing up blocks that were not backed up in previous backup operations RMAN's "incremental backup from SCN " option allows one to start from specified SCN

Repository vs. Controlfile Repository Track Multitude of Databases Maintain Backup / Recovery Scripts Controlfile No Repository needed

Encrypting Backup Sets Use CONFIGURE ENCRYPTION command: CONFIGURE ENCRYPTION FOR [DATABASE | TABLESPACE …] Users specify the encryption algorithm to use for the backup: Oracle Wallet (default) User-specified password Use RMAN and Oracle Secure Backup for encrypted backups to tape

Parameters that Affect RMAN CONTROL_FILE_RECORD_KEEP_TIME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE NLS_DATE_FORMAT NLS_LANG

Setting NLS_LANG and NLS_DATE_FORMAT Environment variables set at the operating system level: Windows: REGEDIT UNIX NLS_LANG=American_America.AR8MSWIN1256 export NLS_LANG

Initialization Parameters CONTROL_FILE_RECORD_KEEP_TIME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE

Change RMAN Default Settings with CONFIGURE RMAN uses default settings for CONFIGURE options. You can revert to the default for any CONFIGURE command by running the same command with the CLEAR option: RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

Uses for CONFIGURE Change retention policy Define the settings for automatic channels for a specified device type Set the device type Define the default format for the control file autobackup output files Toggle control file autobackup feature

Using the SHOW Command Display current value(s) for any or all of RMAN's configured settings See which values are currently set to their defaults Connect to the target database and recovery catalog (if used). Execute SHOW command with appropriate setting: RMAN> SHOW RETENTION POLICY;

Using the SHOW ALL Command Displays all settings that may be changed with CONFIGURE The output is displayed as the series of RMAN commands that is necessary to re-create the configuration. You can save the output of SHOW ALL into a text file and use that command file to re-create the configuration on the same or a different database. Output lines containing a pound sign ( # ) indicate default values.

Setting a Retention Policy A retention policy determines how long database backups are retained, as well as how far back you can recover your database. For many legal and other reasons, setting a retention policy is vital to a company. You can set retention policy in the form of either a recovery window (how far into the past you must be able to recover your database) or a redundancy value (how many backups of each file you need to retain).

Retention Policy Commands Ensure that RMAN retains sufficient backups to be able to recover to any point in time in the past eight days: RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 8 DAYS; Ensure that RMAN retains the last four backups of each data file RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 4;

The DELETE OBSOLETE Command and the KEEP Option DELETE OBSOLETE removes backups deemed obsolete by retention policy Database automatically deletes obsolete backups in the flash recovery area when space is needed. KEEP option of the BACKUP and CHANGE commands overrides the configured retention policy for individual backups

Configuring RMAN to Write Disk Backups RMAN channels are responsible for executing all RMAN tasks. By default, RMAN specifies one disk channel for all operations. The following command configures RMAN to write disk backups to the /backup directory. CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/ora_df%t_s%s_s%p'; The format specifier %t is replaced with a four- byte time stamp, %s with the backup set number, and %p with the backup piece number.

Configuring an Automatic Storage Disk Group Specify ASM group as argument: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+dgroup1'; Implications: Backups directed away from flash recovery area Loss of disk space management capabilities

Special Configuration for Media Managers Use PARMS string in the CONFIGURE command: CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='ENV=mml_env_settings'; Use CONFIGURE DEVICE TYPE SBT to configure parallelism settings for SBT device

Automatically Back Up the Control and Server Parameter Files Enable autobackup: CONFIGURE CONTROLFILE AUTOBACKUP ON; Disable autobackup: CONFIGURE CONTROLFILE AUTOBACKUP OFF;

Change the Default Autobackup Format You can change the default format by running the following command: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'string'; deviceSpecifier is any valid device 'string' is a valid handle for the specified device The only substitution variable permitted in ' string' is %F.

Clear the Default Autobackup Format You can clear control file autobackup formats for a device by running the following commands: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt CLEAR;

Specifying the SET CONTROLFILE AUTOBACKUP FORMAT Command Order of precedence of controlfile autobackup formats: SET CONTROLFILE AUTOBACKUP FORMAT (within a RUN block) SET CONTROLFILE AUTOBACKUP FORMAT (at RMAN prompt) CONFIGURE CONTROLFILE AUTOBACKUP FORMAT

Configure Backup Sets or Image Copies Establish default file type for backup: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY; # image copies RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET; # uncompressed backup sets The default for backups to disk is backup set.

Write Control File Autobackups to the /backupdir Directory Control file autobackups are stored in flash recovery area by default Write control file autobackups to the /backupdir directory: RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backupdir/cf%F';

Configure RMAN to Make Backups to Other Devices RMAN backs up to disk by default Set up SBT (tape / media manager) device, then direct RMAN to use it: CONFIGURE DEFAULT DEVICE TYPE TO sbt;

Configuring RMAN to Use Compressed Backupsets Instruct RMAN to use compressed backup sets by default: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET ; Use same command without COMPRESSED option to disable compression: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;

Manage RMAN’s Persistent Settings Use CONFIGURE command to specify: Disk and SBT channel behavior Backup destinations Policies affecting backup strategy Changes survive shutdown and restart of RMAN

RMAN Disk Channel Behavior One disk channel is "default" channel for all operations Information stored in flash recovery area if no other location specified Use FORMAT clause with CONFIGURE CHANNEL DEVICE TYPE DISK to specify alternative default location for disk backups

Configuring RMAN to Write Disk Backups to a Temporary Directory Write disk backups to the directory /tmp : RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/tmp/%U'; Use CLEAR option to undo specific configuration: RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT CLEAR;

Make the Media Manager the Default Backup Destination Configure media management software, then direct RMAN backups to media manager: RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt; Use PARMS string, if necessary, to pass parameters to media manager: RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='ENV=mml_env_settings'; Use multiple channels for parallel backups

Start RMAN Utility and Allocate Channels Start RMAN with a connection to the target database, the auxiliary instance, and, if applicable, the recovery catalog database: % rman TARGET CATALOG AUXILIARY

Manually Allocate Auxiliary Channels Manually allocate at least one auxiliary channel if you have not configured automatic channels The channel type ( DISK or sbt ) must match the media. More channels means faster duplication if the backups are on disk. Limit the number of channels to the number of devices available for tape backups.

Manually Allocate Auxiliary Channels – Example Manual allocation of an SBT channel and three auxiliary channels: RUN { ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt; ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK; ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK; ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;. DUPLICATE TARGET DATABASE TO dupdb; }