Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.

Slides:



Advertisements
Similar presentations
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
Advertisements

Oracle Architecture. Instances and Databases (1/2)
Backup and recovery Basics of Backup and restoration Types of recovery Defining strategy Starting up and shutting down 80/20 rule SLA’s.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Advanced Databases DBA: Backups 1. Advanced Databases Agenda Define backup Discuss Backup Terminology Explain various backup and restore options in Oracle.
Database Backup and Recovery
RMAN Restore and Recovery
Backup and Recovery (2) Oracle 10g CAP364 1 Hebah ElGibreen.
Backup and Recovery Part 1.
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
Harvard University Oracle Database Administration Session 11 Database Recovery.
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.
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 5 Managing Control Files, Online Redo Logs, and Archiving.
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.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Oracle backup and recovery strategy
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
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.
IS 4510 – Database Administration Module – 2 Database Backup 10/24/20141Compiled by: Zafar Iqbal Khan.
Backup & Recovery Concepts for Oracle Database
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
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.
SRUTHI NAGULAVANCHA CIS 764, FALL 2008 Department of Computing and Information Sciences (CIS) Kansas State University -1- Back up & Recovery Strategies.
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.
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.
RMAN: Your New Best Friend for Backup and Recovery Ruth Gramolini ORACLE DBA Vermont Department of Taxes.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 8 Complete Recovery with Recovery Manager.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
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.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
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.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
10 Copyright © 2007, Oracle. All rights reserved. Using RMAN Enhancements.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
Copyright  Oracle Corporation, All rights reserved. 3 Oracle Backup and Recovery Configuration.
Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.
Backup and Recovery.
Backup and Recovery (1) Oracle 10g Hebah ElGibreen CAP364.
Performing Database Backups
Index Index.
Performing User-Managed Backup and Recovery
Performing Database Recovery
Presentation transcript:

Overview of Oracle Backup and Recovery Darl Kuhn, Regis University

Backup and Recovery Planning How valuable is your data? How much data can you lose? Is the data easily recreated? Mean time to recovery requirements (MTTR) Availability requirements Disaster recovery requirements (DR) Test Plan How much money can you spend?

Oracle Architecture

Noarchivelog Mode

Archivelog Mode

Archivelog Mode Continued Advantages Enables mechanim for recovery of every comitted transaction Enables online backups (Hot or RMAN) Disadvantages Requires additional storage Additional administrative overhead Additional process (ARCn) and I/O

Enabling Archivelog Mode SQL> shutdown immediate; SQL> startup mount; SQL> alter database archivelog; SQL> alter database open; In your init.ora or spfile: log_archive_start=true Note: log_archive_start is deprecated in 10g

Types of Backups User Managed Physical Backups Cold (offline) Hot (online) User Managed Logical Backups Export Data Pump (10g only) Recovery Manager (RMAN) Offline physical Online physical 3 rd Party Tools

Cold Backup (offline) Database shutdown during backup Uses operating system copy command Cold Backup Steps: 1. Determine location of datafiles, controlfiles, and online redo logs 2. Shutdown immediate, transactional, or normal 3. Copy files to backup location 4. Startup database

Hot Backup (online) Database must be in archivelog mode Tablespaces must be altered in and out of backup mode Database remains online during backup While tablespace in backup mode: When a block first changes Full block written to redo stream Not just the atomic change vector Can be significant performance hit Very common misperception that DBWn stops writing to datafiles during Hot Backup, not true!

Hot Backup Procedure Hot Backup has more moving parts than a Cold: 1. Ensure database in archivelog mode 2. Determine which files to backup 3. Switch on-line redo logs 4. Alter tablespaces into backup mode (serial or parallel) 5. Use an OS utility to copy datafiles to backup location 6. Alter tablespaces out of backup mode 7. Switch on-line redo logs 8. Copy any archive redo logs generated during backup 9. Backup the controlfile via "alter database backup controlfile to ";

Logical Backups Export Data Pump export: 10g only Performance Schedule data pump jobs within the server Control and monitor data pump jobs from a different session Enhanced ETL operations

Recovery Manager (RMAN) RMAN is a tool that can be used for backup, restore, and recovery of Oracle databases First shipped with Oracle version 8.0 Oracle's recommended tool for B&R No extra license required

RMAN Architecture Target Database datafiles controlfil es Archived redo logs rman Server Proce sses Recovery Catalog Database (optional) Backup files on disk Serv er Proc esses Server Processe s Media Manage ment (optional ) Back up medi a Target Database Datafiles

RMAN Advantages Tablespaces not put in backup mode Incremental backups Block corruption detection Configurable I/O features Logging of backup operations Integrates with Media Management Layer (MML) software

RMAN 9i New Features Backup optimization Restore optimization Block level recovery New features for archive redo log backups Configurable persistent settings, automatic backup of controlfile, spfile Simplied syntax Retention policy

RMAN 10g New Features Flash recovery Change tracking Incremental merge Backup duration Compressed backups Automatic channel failover Restore failover Restore preview Automatic creation of missing datafiles Recovery through resetlogs

RMAN Backups Should you use a recovery catalog? Should you use a MML? Online or Offline Database must be in archivelog mode for online RMAN backups Can be as simple as: RMAN> backup database;

Failures Happen Non-Media Failure Process failure Statement failure User error Instance failure Media Failure Oracle unable to perform I/O on database file Requires DBA intervention

Crash vs. Media Recovery On startup, Oracle determines whether crash or media failure situation exists: IF (cf SCN = df SCN) THEN Startup normally; ELSE IF (cf stop SCN = infinity) THEN SMON performs crash recovery; ELSE IF (cf SCN > df SCN) THEN Throw media failure error; ELSE IF (cf SCN < df SCN) THEN Throw controlfile too old error; END IF;

Restore and Recovery Restore is copying datafiles back from the backup set Recovery is apply redo to the datafiles via a “recover” command Many, many different B&R scenarios Restore and recovery procedure varies widely depending on: Type of backup Type of failure (datafile, controlfile, redo) Archivelog or noarchivelog mode

Noarchvielog Mode Restore Restore from Cold Backup or an RMAN offline backup Restores to the point in time the backup was taken No redo available to restore transactions Most likely will result in loss of data

Archivelog Mode Restore and Recovery Restore datafiles from: Cold backup Hot backup RMAN online or offline backup Issure “recover” command to apply redo SQL> recover database.... Recovery can be either complete or incomplete

Complete Recovery Complete recovery means that you can recover all transactions ever comitted in the database You're restoring the database to the point in time right before the failiure occurred Complete recovery only available for archivelog mode databases Complete does not mean that you have to restore and recover all datafiles Only have to restore and recover datafiles that have experienced media failure

Incomplete Recovery All transactions are not restored Three types of incomplete recovery: Change (SCN) Time Log Basic procedure: Copy all datafiles back from the backup set Rollforward to desired point SQL> alter database open resetlogs;

Summary Develop B&R plan that meets business requirements Wide variety of methods to backup and recover your database Use RMAN “Your backup is only as good as the last time you tested it...”