• No results found

D71862GC10 Student Guide

N/A
N/A
Protected

Academic year: 2021

Share "D71862GC10 Student Guide"

Copied!
338
0
0

Loading.... (view fulltext now)

Full text

(1)THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Student Guide. D71862GC10. Edition 1.0. March 2011. D72508. Oracle University and Egabi Solutions use only. Oracle Database 11g: Backup and Recovery Workshop.

(2) Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Donna Keesling. Disclaimer. James Spiller. Technical Contributors and Reviewers Christopher D. Andrews Maria Billings Herbert Bradbury Timothy Chien Donna Cooksey Pascal Daniel Joe Fong Gerlinde Frenzen Mark Fuller Joel Goodman Uwe Hesse Dominique Jeunot Pete Jones Gwen Lazenby Deirdre Matishak Veerabhadra Rao Putrevu Ira Singer Hironori Susuta Branislav Valny Anthony Woodell. Publisher Sujatha Nagendra. This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Authors.

(3) Preface 1. Introduction Objectives 1-2 Assessing Your Recovery Requirements First Step in Data Protection Planning 1-3 Assessing Your Recovery Requirements 1-5 Categories of Failure 1-6 Data Failures 1-7 Oracle Data Protection Solutions 1-8 Backup and Recovery Foundation Complete Oracle Solution from Disk to Tape 1-9 Oracle Recovery Manager (RMAN) Integrated Backup and Recovery Engine 1-10 Oracle Secure Backup Enterprise Tape Backup Management 1-11 Oracle Secure Backup Cloud Module Offsite Database Backups in the Cloud 1-12 Oracle Data Guard Overview 1-13 Physical Standby Database: Redo Apply Architecture 1-15 Logical Standby Database: SQL Apply Architecture 1-16 Oracle Active Data Guard 1-17 Oracle Maximum Availability Architecture Robust & Integrated Data Protection 1-18 Quiz 1-19 Summary 1-20 Practice 1-1 Overview: Exploring the Oracle Virtual Machine Environment 1-21. 2. Using Enterprise Manager and the RMAN Client Objectives 2-2 Using Enterprise Manager for Backup and Recovery Operations 2-3 Using the RMAN Client 2-4 Types of RMAN Commands 2-5 Job Commands: Example 2-6 Configuring Persistent Settings for RMAN 2-7 Viewing Persistent Settings 2-8 Managing Persistent Settings 2-9 Specifying a Retention Policy 2-10 Quiz 2-12 Summary 2-13 Practice 2-1 Overview: Configuring the Default Backup Destination 2-14. iii. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Contents.

(4) 3. Configuring for Recoverability Objectives 3-2 Using a Fast Recovery Area 3-3 Configuring the Fast Recovery Area 3-5 Sizing the Fast Recovery Area (FRA) 3-7 Fast Recovery Area Space Management 3-9 Multiplexing Control Files 3-11 Control File Autobackups 3-12 Redo Log Files 3-14 Multiplexing the Redo Log 3-15 Creating Archived Redo Log Files 3-16 Configuring ARCHIVELOG Mode 3-17 Quiz 3-18 Summary 3-19 Practice 3-1 Overview: Configuring Control Files 3-20 Practice 3-2 Overview: Configuring the Fast Recovery Area 3-21 Practice 3-3 Overview: Configuring Redo Log Files 3-22 Practice 3-4 Overview: Configuring ARCHIVELOG Mode 3-23. 4. Using the RMAN Recovery Catalog Objectives 4-2 RMAN Repository Data Storage: Comparison of Options 4-3 Storing Information in the Recovery Catalog 4-4 Reasons to Use a Recovery Catalog 4-5 Creating the Recovery Catalog: Three Steps 4-7 Configuring the Recovery Catalog Database 4-8 Creating the Recovery Catalog Owner 4-9 Creating the Recovery Catalog 4-10 Managing Target Database Records in the Recovery Catalog 4-11 Registering a Database in the Recovery Catalog 4-12 Unregistering a Target Database from the Recovery Catalog 4-14 Recovery Catalog Resynchronization: Concepts 4-15 Manually Resynchronizing the Recovery Catalog 4-17 Backing Up the Recovery Catalog 4-18 Creating and Using Virtual Private Catalogs 4-19 Quiz 4-20 iv. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-2 Overview: Setting the Date and Time Format for RMAN 2-15 Practice 2-3 Overview: Enabling Control File and SPFILE Autobackups 2-16 Practice 2-4 Overview: Configuring Backup Retention Policy 2-17 Practice 2-5 Overview: Configuring Devices for Backup 2-18.

(5) 5. Backup Concepts and Strategies Objectives 5-2 Backup Solutions: Overview 5-3 Understanding Backup Terminology 5-4 Additional Backup Terminology 5-5 RMAN Backup Types 5-6 Configuring Backup and Restore for Very Large Files 5-8 Using a Media Manager 5-9 Balancing Backup and Restore Requirements 5-11 Using the FRA for Automatic Disk-to-Disk Backup and Recovery 5-13 Comparing Backup Strategies 5-14 Option 1: Full and Incremental Tape Backups 5-15 Option 2: Incrementally Updated Disk Backups 5-16 Option 3: Offload Backups to Physical Standby Database in Data Guard Environment 5-17 Data Warehouse Backup and Recovery: Best Practices 5-18 Quiz 5-19 Summary 5-21 Practice 5-1 Overview: Case Study: Developing a Backup Strategy 5-22 Practice 5-2 Overview: Creating a Backup Schedule 5-23 Practice 5-3 Overview: Backing Up the Recovery Catalog 5-24. 6. Creating Backups Objectives 6-2 Review: Oracle-Suggested Backup 6-3 Creating Backup Sets 6-4 Creating Image Copies 6-5 Incrementally Updated Backups 6-7 Incrementally Updated Backups: Example 6-8 Creating a Whole Database Backup 6-9 Backing Up Read-Only Tablespaces 6-11 Creating RMAN Multisection Backups 6-12 Checking for Block Corruption 6-13 Fast Incremental Backup 6-14 Enabling Fast Incremental Backup 6-16 v. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Summary 4-22 Practice 4-1 Overview: Creating the Recovery Catalog Owner 4-23 Practice 4-2 Overview: Creating the RMAN Recovery Catalog 4-24 Practice 4-3 Overview: Registering a Database in the Recovery Catalog 4-25 Practice 4-4 Overview: Configuring the Recovery Catalog for Recovery 4-26.

(6) 7. Restore and Recovery Concepts Objectives 7-2 Employing the Best Oracle Recovery Technology 7-3 Instance Failure 7-5 Understanding Instance Recovery 7-6 Phases of Instance Recovery 7-7 Tuning Instance Recovery 7-8 Using the MTTR Advisor 7-9 Media Failure 7-10 Complete Recovery Process 7-11 Point-in-Time Recovery Process 7-12 Quiz 7-14 Summary 7-17 Practice 7-1 Overview: Case Study: Determining Recovery Procedures 7-18 Practice 7-2 Overview: Performing Instance Recovery 7-19. vi. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Monitoring Block Change Tracking 6-17 Quiz 6-18 Creating Proxy Copies 6-19 Saving Backup Space with Unused Block Compression 6-20 Compressing Backups 6-21 Using RMAN Backup Compression 6-22 Quiz 6-24 RMAN-Encrypted Backups 6-26 Creating RMAN-Encrypted Backups 6-27 Using Transparent-Mode Encryption 6-28 Using Password-Mode Encryption 6-30 Using Dual-Mode Encryption 6-31 RMAN-Encrypted Backups: Considerations 6-32 Backing Up the Control File to a Trace File 6-33 Cataloging Additional Backup Files 6-34 Backing Up ASM Disk Group Metadata 6-36 Quiz 6-37 Summary 6-38 Practice 6-1 Overview: Configuring Block Change Tracking 6-39 Practice 6-2 Overview: Creating Incremental Backups 6-40 Practice 6-3 Overview: Backing Up Other Database Files 6-41 Practice 6-4 Overview: Backing Up ASM Metadata 6-42.

(7) Using the Data Recovery Advisor Objectives 8-2 Data Recovery Advisor: Reducing Problem Diagnosis Time 8-3 Data Recovery Advisor: Overview 8-4 Using the Data Recovery Advisor 8-5 Data Recovery Advisor: RMAN Command-Line Interface 8-6 Data Recovery Advisor: Enterprise Manager Interface 8-7 Listing Data Failures 8-8 Advising on Repair 8-9 Quiz 8-10 Summary 8-11 Practice 8-1 Overview: Using Data Recovery Advisor to Repair Corrupted Blocks 8-12 Practice 8-2 Overview: Diagnosing and Recovering from Database Failure 8-13. 9. Performing Recovery Objectives 9-2 Understanding File Loss 9-3 Ensuring Backups are Available 9-4 Performing Restore and Recovery of a Database in NOARCHIVELOG Mode 9-5. Using Incremental Backups to Recover a Database in NOARCHIVELOG Mode 9-6. Performing Complete Recovery: Loss of a Noncritical Data File in ARCHIVELOG Mode 9-7 Performing Complete Recovery: Loss of a System-Critical Data File in ARCHIVELOG Mode 9-8 Recovering from a Lost Index Tablespace 9-9 Quiz 9-10 Restoring ASM Disk Groups 9-12 Restoring ASM Disk Groups: Examples 9-13 Automatic Tempfile Recovery 9-14 Performing a Fast Switch to Image Copies 9-16 Using SET NEWNAME for Switching Files 9-17 Performing Point-in-Time Recovery 9-18 Loss of a Control File 9-20 Recovering from the Loss of All Control File Copies: Overview 9-21 Recovering the Control File to the Default Location 9-22 Performing Recovery with a Backup Control File 9-23 Quiz 9-24 Loss of a Redo Log File 9-25 Re-creating a Password Authentication File 9-27. vii. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. 8.

(8) 10 Flashback Technologies Objectives 10-2 Flashback Technologies Error Detection and Correction 10-3 Flashback Technology 10-4 Preparing Your Database for Flashback 10-7 Guaranteeing Undo Retention 10-9 Using Flashback Data Archive 10-10 Creating a Flashback Data Archive and Enabling Archiving 10-11 Using Flashback Technology to Query Data 10-12 Flashback Query 10-13 Flashback Version Query 10-14 Flashback Version Query: Considerations 10-15 Flashback Table: Overview 10-16 Flashback Table 10-17 Performing Flashback Table 10-18 Flashback Table: Considerations 10-19 Flashback Transaction Query 10-20 Using Enterprise Manager to Perform Flashback Transaction Query 10-21 Flashback Transaction Query: Considerations 10-22 viii. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Recovery from Loss of Server Parameter File 9-29 Restoring the Server Parameter File from the Control File Autobackup 9-30 Restoring the Control File from Autobackup 9-31 Restoring Encrypted Backups 9-33 Block Media Recovery 9-34 Prerequisites for Block Media Recovery 9-35 Recovering Individual Blocks 9-36 Automatic Block Repair: Primary Database 9-37 Automatic Block Repair: Physical Standby Database 9-38 Quiz 9-39 Summary 9-40 Practice 9-1 Overview: Recovering from Media Failure (Complete Recovery) 9-41 Practice 9-2 Overview: Recovering from Media Failure (Incomplete Recovery) 9-42 Practice 9-3 Overview: Restoring the Parameter File 9-43 Practice 9-4 Overview: Restoring the Control File 9-44 Practice 9-5 Overview: Recovering from the Loss of All Control Files 9-45 Practice 9-6 Overview: Restoring the Password File 9-46 Practice 9-7 Overview: Recovering a Tempfile 9-47 Practice 9-8 Overview: Creating Encrypted Backups 9-48 Practice 9-9 Overview: Recovering by Using an Encrypted Backup 9-49 Practice 9-10 Overview: Recovering an Encryption Wallet 9-50.

(9) 11 Flashback Database Objectives 11-2 Flashback Database: Continuous Data Protection 11-3 Flashback Database 11-4 Flashback Database Architecture 11-5 Configuring Flashback Database 11-6 Flashback Database: Examples 11-7 Flashback Database Considerations 11-8 Monitoring Flashback Database Information 11-9 Using Enterprise Manager to Monitor Flashback Database Information 11-11 Guaranteed Restore Points 11-12 Flashback Database and Guaranteed Restore Points 11-13 Best Practices: Flashback Database 11-15 Quiz 11-17 Summary 11-19 Practice 11-1 Overview: Configuring Flashback Database 11-20 Practice 11-2 Overview: Using Flashback Database 11-21 Practice 11-3 Overview: Preparing Your System for the Workshop 11-22 12 RMAN Performance and Tuning Objectives 12-2 Using Dynamic Views to Diagnose RMAN Performance 12-3 Monitoring RMAN Job Progress 12-4 Identifying Backup and Restore Bottlenecks 12-6 Asynchronous I/O Bottlenecks 12-7 Synchronous I/O Bottlenecks 12-8 Tuning RMAN Backup Performance 12-9 Setting LARGE_POOL_SIZE 12-10 RMAN Multiplexing 12-11 Diagnosing Performance Bottlenecks 12-13 ix. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Flashback Transaction 10-23 Flashing Back a Transaction 10-24 Completing the Flashback Transaction Operation 10-25 Best Practices: Undo-based Flashback Flashback Query, Flashback Table 10-26 Flashback Drop and the Recycle Bin 10-27 Quiz 10-28 Summary 10-30 Practice 10-1 Overview: Preparing to Use Flashback Technologies 10-31 Practice 10-2 Overview: Restoring a Dropped Table 10-32 Practice 10-3 Overview: Using Flashback Table 10-33.

(10) 13 Workshop Overview Objectives 13-2 Workshop Structure and Approach 13-3 Business Requirements for the Workshop Database 13-5 Diagnosing the Failures 13-6 Summary 13-7. x. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Diagnosing Performance Bottlenecks: Read Phase 12-14 Diagnosing Performance Bottlenecks: Write or Copy Phase 12-15 Restore and Recovery Performance: Best Practices 12-16 Quiz 12-17 Summary 12-18.

(11) Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Preface.

(12) Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED.

(13) Before you begin this course, you should be able to perform basic Oracle Database administration tasks. How This Course Is Organized Oracle Database 11g: Backup and Recovery Workshop is an instructor-led course featuring lectures and hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts and skills that are introduced.. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Profile Before You Begin This Course.

(14) Title. Part Number. Oracle Database Administrator's Guide 11g Release 2 (11.2). E10595-06. Oracle Database Backup and Recovery Reference 11g Release 2 (11.2). E10643-01. Oracle Database Backup and Recovery User's Guide 11g Release 2 (11.2). E10642-01. Oracle Database Concepts 11g Release 2 (11.2) Additional Publications • System release bulletins • Installation and user’s guides • read.me files • International Oracle User’s Group (IOUG) articles • Oracle Magazine. E10713-05. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Related Publications Oracle Publications.

(15) The following two lists explain Oracle University typographical conventions for words that appear within regular text or within code samples. 1. Typographic Conventions for Words Within Regular Text Convention. Object or Term. Example. Courier New. User input; commands; column, table, and schema names; functions; PL/SQL objects; paths. Use the SELECT command to view information stored in the LAST_NAME column of the EMPLOYEES table. Enter 300. Log in as scott. Initial cap. Triggers; Assign a When-Validate-Item trigger to user interface object the ORD block. names, such as button names Click the Cancel button.. Italic. Titles of courses and manuals; emphasized words or phrases; placeholders or variables. For more information on the subject see Oracle SQL Reference Manual. Lesson or module titles referenced within a course. This subject is covered in Lesson 3, “Working with Objects.”. Quotation marks. Do not save changes to the database. Enter hostname, where hostname is the host on which the password is to be changed.. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Typographic Conventions.

(16) 2. Typographic Conventions for Words Within Code Samples Convention. Object or Term. Example. Uppercase. Commands, functions. SELECT employee_id FROM employees;. Lowercase, italic. Syntax variables. CREATE ROLE role;. Initial cap. Forms triggers. Form module: ORD Trigger level: S_ITEM.QUANTITY item Trigger name: When-Validate-Item . . .. Lowercase. Column names, table names, filenames, PL/SQL objects. . . . OG_ACTIVATE_LAYER (OG_GET_LAYER ('prod_pie_layer')) . . . SELECT last_name FROM employees;. Bold. Text that must be entered by a user. CREATE USER scott IDENTIFIED BY tiger;. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Typographic Conventions (continued).

(17) THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle University and Egabi Solutions use only. I t d ti Introduction.

(18) After completing this lesson, you should be able to: • Assess your recovery requirements • Describe types of database failures • Describe Oracle backup and recovery solutions • Describe the benefits of using Oracle Secure Backup • Describe the benefits of using Oracle Data Guard • Describe the Oracle Maximum Availability Architecture. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Database 11g: Backup and Recovery Workshop 1 - 2. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Objectives.

(19) • •. Identify and prioritize critical data Base recovery requirements on data criticality – Recovery Point Objective (RPO): Tolerance for data loss — —. How frequently should backups be taken? Point-in-time recovery required?. – Recovery Time Objective (RTO): Tolerance for downtime —. —. Downtime: Problem identification + recovery planning + systems recovery Tiered RTO per level of granularity (database, tablespace, table, row). – Determine backup retention policy for onsite, offsite, and long-term backups. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Assessing Your Recovery Requirements To assess your recovery requirements properly, you should first determine how critical a database that is lost or unavailable is to your business business. Consider the following: • How much will the company lose per hour of downtime? • How much will be lost in productivity and labor costs if the database is down? By quantifying these costs, you will be able to justify hardware and storage expenditures to prevent and recover from database failures. Your next step is to classify your databases according to their criticality. As an example, a company has a large data warehousing reporting system that can tolerate twelve hours worth of lost data, because batch loads can be rerun with a few hours of downtime that is acceptable to the user community. A disk/tape backup strategy may be appropriate for this type of system. Another company has a critical OLTP system that can tolerate no more than a few minutes worth of lost data and several minutes of acceptable downtime, because a down database translates into $100,000 per hour of lost revenue. For this system, a traditional backup and recovery solution will not suffice. The company needs to consider a "minimal downtime solution" such as Oracle Data Guard.. Oracle Database 11g: Backup and Recovery Workshop 1 - 3. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Assessing Your Recovery Requirements First Step in Data Protection Planning.

(20) Determine your Recovery Point Objective (RPO), which helps you evaluate how much data loss is acceptable. Consider the following: • Are there some databases that require more frequent backups? • Is adequate disk space available for archived logs (for point-in-time recovery as an example)? Consider your Recovery Time Objective (RTO) to determine how much recovery time you can tolerate. Is it hours, or only minutes? Bear in mind that RTO may vary by database and/or server. You may require a combined disk and tape backup strategy for critical databases to pressing g RTO requirements. q meet more p Once you have determined your desired recovery capability from disk and tape, assess the retention period for backups.. Oracle Database 11g: Backup and Recovery Workshop 1 - 4. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Assessing Your Recovery Requirements (continued).

(21) •. Assess data protection requirements – Physical: Disasters, outages, failures, corruptions – Logical: Human errors, application errors. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Assessing Your Recovery Requirements (continued) In addition to assessing your recovery requirements, you need to determine which failures you need to protect against. against Consider physical losses of data and logical errors that can occur in your application and database.. Oracle Database 11g: Backup and Recovery Workshop 1 - 5. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Assessing Your Recovery Requirements.

(22) Failures can generally be divided into the following categories: • Statement failure • User process failure • Network failure • User error • Instance failure • Media failure. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Categories of Failure • • • • • •. Statement failure: A single database operation (select, insert, update, or delete) fails. User process failure: A single database session fails. Network failure: Connectivity to the database is lost. User error: A user successfully completes an operation, but the operation (dropping a table or entering bad data) is incorrect. Instance failure: The database instance shuts down unexpectedly. Media failure: A loss of any file that is needed for database operation (that is, the files have been deleted or the disk has failed).. Oracle Database 11g: Backup and Recovery Workshop 1 - 6. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Categories of Failure.

(23) •. • • • •. Inaccessible components: Missing data files at the OS level, incorrect access permissions, offline tablespace Physical y corruptions: p Block checksum failures,, invalid block header field values Logical corruptions: Inconsistent dictionary; corrupt row piece, index entry, or transaction Inconsistencies: Control file older or newer than the data files and online redo logs I/O failures: Limit on the number of open files exceeded, inaccessible channels, network or I/O error. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Data Failures Included in the slide are additional types of failures you should anticipate in your environment. Throughout this course, course methods to address various types of failures will be presented. presented. Oracle Database 11g: Backup and Recovery Workshop 1 - 7. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Data Failures.

(24) Backup and Recovery Objective. Recovery Time Objective (RTO). Oracle Solution. Physical data protection. Hours/Days. Recovery Manager Oracle Secure Backup. Logical data protection. Minutes/Hours. Flashback Technologies. Recovery analysis. Minimize time for problem identification and recovery planning. Data Recovery Advisor. Disaster Recovery Objective. Recovery Time Objective (RTO). Oracle Solution. Physical data protection. Seconds/Minutes. Active Data Guard. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Data Protection Solutions Oracle provides an appropriate data protection solution depending on your backup and recovery objective and RTO: • Oracle Recovery Manager (RMAN) is the core Oracle Database software component that manages database backup, restore, and recovery processes. • Oracle Secure Backup (OSB) is Oracle’s enterprise-grade tape backup management solution for both database and file system data. • Oracle Database Flashback Technologies are a set of data recovery solutions that enable human errors to be reversed by y selectively y and efficiently y undoing g the effects of a mistake. • The Data Recovery Advisor provides intelligent database problem identification and recovery capabilities. • Active Data Guard enables physical standby databases to be open for read access while being kept synchronized with the production database through media recovery. Additional information about these features and technologies will be presented in this course.. Oracle Database 11g: Backup and Recovery Workshop 1 - 8. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Data Protection Solutions.

(25) File System Data UNIX. Oracle Secure Backup (OSB). Linux. Windows. NAS Oracle Recovery Manager (RMAN). Fast Recovery Area. Oracle Secure Backup (OSB) Cloud Module. Amazon S3 Cloud Storage. Oracle Databases. • •. Tape Backup. Oracle backup and recovery for your entire IT environment Multiple media options available to meet the most stringent SLAs: Local disk, remote Cloud storage, physical and virtual tape p Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Backup and Recovery Foundation Oracle Secure Backup delivers centralized tape backup management for distributed, heterogeneous environments for your entire IT environment, environment by providing: • Oracle Database integration with Recovery Manager (RMAN) supporting versions Oracle9i to Oracle Database 11g. • File system data protection for UNIX, Windows, and Linux servers, as well as Network Attached Storage (NAS) protection via the Network Data Management Protocol (NDMP). A key ey co component po e t o of tthe eO Oracle ac e d disk s bac backup up st strategy ategy is s tthe e fast ast recovery eco e y a area ea ((FRA), ), a storage location on a file system or Automatic Storage Management (ASM) disk group that organizes all recovery-related files and activities for an Oracle database. All files that are required to fully recover a database from media failure can reside in the fast recovery area, including control files, archived logs, data file copies, and RMAN backups. With RMAN and the Oracle Secure Backup Cloud module it is now possible to send local disk backups directly to Amazon S3 for offsite storage. The Oracle Secure Backup Cloud module can also be used to stream backups directly to the Cloud Cloud.. Oracle Database 11g: Backup and Recovery Workshop 1 - 9. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Backup and Recovery Foundation Complete Oracle Solution from Disk to Tape.

(26) •. Oracle Enterprise Manager. – Block validation – Online block-level block level recovery – Tablespace/data file recovery – Online, multi-streamed backup – Unused block compression – Native encryption. Oracle Secure B k Backup. RMAN Tape Drive. • Fast Recovery Area Database. Cloud. Intrinsic knowledge of database file formats and recovery procedures. Integrated disk, tape and cloud backup leveraging the fast recovery area and Oracle Secure Backup. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Recovery Manager (RMAN) Oracle Recovery Manager (RMAN) is the core Oracle Database software component that manages database backup backup, restore restore, and recovery processes processes. RMAN maintains configurable backup and recovery policies and keeps historical records of all database backup and recovery activities. RMAN ensures that all files required to successfully restore and recover a database are included in complete database backups. Furthermore, as part of RMAN backup operations, all data blocks are verified to ensure that corrupt blocks are not propagated into the backup files. The diagram on the slide provides one suggested configuration for backups. In this diagram, RMAN uses th the ffastt recovery area ffor b backups. k O Optionally, ti ll th through hO Oracle l S Secure B Backup, k backups can be made to tape and to the cloud. Backups can be performed to other designated locations, such as directly to disk. These options will be described in subsequent lessons.. Oracle Database 11g: Backup and Recovery Workshop 1 - 10. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Recovery Manager (RMAN) Integrated Backup and Recovery Engine.

(27) •. Oracle Enterprise Manager. Oracle Secure Backup p Oracle Database. File System Data. RMAN Integration. • •. Heterogeneous file systems (UNIX/ Linux / Windows) and NAS devices Built-in Oracle integration Centralized management in distributed environments. Virtual Tape Library (VTL). Tape Library. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Secure Backup Oracle Secure Backup is centralized tape backup management software protecting the Oracle database and file systems in distributed UNIX, UNIX Linux, Linux Windows and Network Attached Storage (NAS) environments. Oracle Secure Backup provides tape backup for application files as well as the database. Oracle Secure Backup is integrated with RMAN and provides the media management layer for RMAN backups to tape. Through the use of Oracle Secure Backup, tape backup management is automated through policies throughout g the life cycle y of the backup p tape. p user-defined p From one central console, you can easy manage the distributed servers and tape devices within the backup domain. The Oracle Database 11g: Oracle Secure Backup course provides detailed information on installing and using Oracle Secure Backup. Note: Refer to Oracle Secure Backup Licensing Information for detailed information on feature availabilityy with Oracle Secure Backup and Oracle Secure Backup Express.. Oracle Database 11g: Backup and Recovery Workshop 1 - 11. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Secure Backup Enterprise Tape Backup Management.

(28) Database files / fast recovery area RMAN. Compression / encryption. •. Oracle Secure Backup Cloud Module. Amazon S3. Oracle Secure Backup Cloud module: Back up databases to Amazon Cloud – Complements local disk and/or tape backup – Eliminates IT management overhead of a disaster recovery site – Backed by Amazon S3 uptime SLAs. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Secure Backup Cloud Module You can use RMAN and the Oracle Secure Backup Cloud module to send local disk backups directly to Amazon S3 for offsite storage. storage The Oracle Secure Backup Cloud module can also be used to stream backups directly to the Cloud. This is particularly useful when the database is running in the Cloud, using services such as Amazon Elastic Compute Cloud (EC2). The Oracle Secure Backup Cloud module can be used to back up all supported versions of Oracle Database. You use familiar tools such as Enterprise Manager and RMAN to perform backups to the Cloud.. Oracle Database 11g: Backup and Recovery Workshop 1 - 12. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Secure Backup Cloud Module Offsite Database Backups in the Cloud.

(29) Redo transport. Standby database. Database. Database copy. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Data Guard Overview Oracle Data Guard is a central component of an integrated Oracle Database High Availability (HA) solution set that helps organizations ensure business continuity by minimizing the various kinds of planned and unplanned down time that can affect their businesses. Oracle Data Guard is a management, monitoring, and automation software infrastructure that works with a production database and one or more standby databases to protect your data against failures, errors, and corruptions that might otherwise destroy your database. It protects critical data by providing facilities to automate the creation, management, and monitoring of the databases and other components in a Data Guard configuration. It automates t t the th process off maintaining i t i i a copy off an O Oracle l production d ti d database t b ((called ll d a standby database) that can be used if the production database is taken offline for routine maintenance or becomes damaged. In a Data Guard configuration, a production database is referred to as a primary database. A standby database is a synchronized copy of the primary database. Using a backup copy of the primary database, you can create from one to thirty standby databases. The standby g with the primary p y database,, make up p a Data Guard configuration. g databases,, together. Oracle Database 11g: Backup and Recovery Workshop 1 - 13. Oracle University and Egabi Solutions use only. Primary database. Ora acle Net. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Data Guard Overview.

(30) All Data Guard standby databases can enable up-to-date read access to the standby database while redo being received from the primary database is applied. This makes all standby databases excellent candidates for relieving the primary database of the overhead of supporting read-only queries and reporting.. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Data Guard Overview (continued). Oracle Database 11g: Backup and Recovery Workshop 1 - 14.

(31) Production database. Redo transport. Redo apply. Physical standby database. Redo stream Backup. Primary database. Physical standby database Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Physical Standby Database: Redo Apply Architecture The Data Guard physical standby Redo Apply architecture consists of: • A production (primary) database, database which is linked to one or more standby databases (up to 30) that are identical copies of the production database. The limit of 30 standby databases is imposed by the LOG_ARCHIVE_DEST_n parameter. In Oracle Database 11g Release 2, the maximum number of destinations is 31. One is used as the local archive destination, leaving the other 30 for uses such as the standby database. Note: You can use the Cascaded Redo Log Destinations feature to incorporate more than 30 standby databases in your configuration. • The standby database, which is updated by redo that is automatically shipped from the primary database. The redo can be shipped as it is generated or archived on the primary database. Redo is applied to each standby database by using Oracle media recovery. During planned down time, you can perform a switchover to a standby database. When a failure occurs, you can perform a failover to one of the standby databases. The physical standby database can also be used to back up the primary database.. Oracle Database 11g: Backup and Recovery Workshop 1 - 15. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Physical Standby Database: Redo Apply Architecture.

(32) Production database. Logical standby database. Redo transport. SQL Apply. Transform redo information into SQL Reports Primary database. Logical standby database Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Logical Standby Database: SQL Apply Architecture In a logical standby database configuration, Data Guard SQL Apply uses redo information shipped from the primary system. system However, However instead of using media recovery to apply changes (as in the physical standby database configuration), the redo data is transformed into equivalent SQL statements by using LogMiner technology. These SQL statements are then applied to the logical standby database. The logical standby database is open in read/write mode and is available for reporting capabilities. A logical standby database can be used to perform rolling database upgrades, thereby minimizing down time when upgrading to new database patch sets or full database releases.. Oracle Database 11g: Backup and Recovery Workshop 1 - 16. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Logical Standby Database: SQL Apply Architecture.

(33) Sync / Async Redo Transport. Primary Database. • • • • •. Active Data Guard Standby Database. Data availability and data protection for Oracle Database Up to thirty standby databases in a single configuration Automatic block repair with zero application downtime Standby database used for queries, reports, testing, or backups Active Data Guard allows q queries against g real-time data Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Active Data Guard Active Data Guard enables physical standby databases to be open for read access while media recovery is being performed on them to keep them synchronized with the production database. The physical standby database is open in read-only mode while redo transport and standby apply are both active. Queries executed on active standby databases return up-todate results. Active Data Guard enforces service level objectives for maximum data delay when querying an active standby. y repairs p corrupt p blocks online using g an active In addition, Active Data Guard automatically standby.. Oracle Database 11g: Backup and Recovery Workshop 1 - 17. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Active Data Guard.

(34) Active Data Guard Fully Active Failover Replica. Production Site. Standby Site. Database. Database. Data Recovery Advisor. Storage. Intelligent, Guided Recovery Analysis. Storage. Flashback Technologies Correct Errors by Moving Back in Time. Recovery Manager (RMAN) & Oracle Secure Backup Low Cost, High Performance Backup & Recovery. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Maximum Availability Architecture Oracle Maximum Availability Architecture (MAA) is Oracle’s best practices blueprint based on proven Oracle high availability technologies and recommendations recommendations. The goal of MAA is to achieve the optimal high availability architecture at the lowest cost and complexity. MAA integrates Oracle Database features for high availability including Real Application Clusters (RAC), Data Guard, GoldenGate, ASM, RMAN, and Enterprise Manager. MAA includes best practice recommendations for critical infrastructure components including servers, storage and network. Beyond the technology, the MAA blueprint encompasses specific design and configuration recommendations that have been tested to ensure optimum system t availability il bilit and d reliability. li bilit E Enterprises t i th thatt lleverage MAA iin th their i IT iinfrastructure f t t fifind d they can quickly and efficiently deploy applications that meet their business requirements for high availability. RMAN may also be used with other non-Oracle tape backup products. However, Oracle Secure Backup provides database backup performance optimizations that may not be found with other products. Detailed information on MAA is available on the Oracle Technology Network web site site.. Oracle Database 11g: Backup and Recovery Workshop 1 - 18. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Oracle Maximum Availability Architecture Robust & Integrated Data Protection.

(35) As a first step in data protection planning, you should determine the criticality of a database by evaluating which of the following: a. Loss of revenue due to downtime b Hardware maintenance costs b. c. Loss in productivity due to downtime d. Software maintenance costs. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Answer: a, c. Oracle Database 11g: Backup and Recovery Workshop 1 - 19. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Quiz.

(36) In this lesson, you should have learned how to: • Assess your recovery requirements • Describe types of database failures • Describe Oracle backup and recovery solutions • Describe the benefits of using Oracle Secure Backup • Describe the benefits of using Oracle Data Guard • Describe the Oracle Maximum Availability Architecture. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Database 11g: Backup and Recovery Workshop 1 - 20. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Summary.

(37) This practice covers the following topics: • Oracle Virtual Machine (OVM) orientation • Verifying that the database instances are started • Starting Enterprise Manager Database Control. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 1-1 Overview: Exploring the Oracle Virtual Machine Environment In this practice you will explore the capabilities and basic commands of the Oracle Virtual Machine (OVM) environment environment.. Oracle Database 11g: Backup and Recovery Workshop 1 - 21. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 1-1 Overview: Exploring the Oracle Virtual Machine Environment.

(38) Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED.

(39) THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle University and Egabi Solutions use only. U i Using Enterprise E t i M Manager and d th the RMAN Client.

(40) After completing this lesson, you should be able to: • Describe the Enterprise Manager backup and recovery interface • Use the RMAN client command-line command line interface • Configure and manage RMAN settings. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Database 11g: Backup and Recovery Workshop 2 - 2. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Objectives.

(41) • •. Graphical user interface to RMAN Wizards employed for many tasks. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Using Enterprise Manager for Backup and Recovery Operations Enterprise Manager provides a graphical interface to the most commonly used RMAN functionality Wizards are employed for many of the RMAN operations through Enterprise functionality. Manager. Oracle Database 11g: Backup and Recovery Workshop 2 - 3. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Using Enterprise Manager for Backup and Recovery Operations.

(42) $ rman target / RMAN> BACKUP DATABASE; Starting backup at 10-JUN-10 . . RMAN> LIST BACKUP; BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ------- ----------- ------------ --------------1 Full 1.06G DISK 00:01:49 10-JUN-10 . . RMAN> DELETE OBSOLETE; . . Do you really want to delete the above objects (enter YES or NO)? YES deleted archived log . .. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Using the RMAN Client Invoke RMAN at the operating system command line and specify the appropriate options. The following are the most commonly used options: • target: The connect-string for the target database • catalog: The connect-string for a recovery catalog • nocatalog: Specifies there is no recovery catalog. This is the default. • cmdfile: The name of an input command file • log: The name of the output message log file The RMAN invocation shown in the slide simply connects to the local database, as the target. At the RMAN prompt, you can submit RMAN commands to manage your backup environment and create backups in many different ways, depending on your needs. Shown in the slide are commands to list the existing backups (LIST BACKUP) and delete any obsolete backups (DELETE OBSOLETE). Note: Refer to the Oracle Database Backup and Recovery User’s Guide for more information about how to invoke RMAN RMAN. Refer to the Oracle Database Backup and Recovery Reference for the complete list of RMAN commands and their options.. Oracle Database 11g: Backup and Recovery Workshop 2 - 4. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Using the RMAN Client.

(43) RMAN commands are of the following types: • Stand-alone command: – Is executed individually at the RMAN prompt – Cannot appear as subcommands within RUN. •. Job command: – Must be within the braces of a RUN command – Is executed as a group. Some commands can be executed as both types.. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Types of RMAN Commands You can issue two basic types of RMAN commands: stand-alone and job commands. Stand alone commands are executed at the RMAN prompt and are generally self Stand-alone self-contained. contained Job commands are usually grouped and executed sequentially inside a command block. If any command within the block fails, RMAN ceases processing; no further commands within the block are executed. The effects of any already executed commands still remain, though; they are not undone in any way. An example of a command that can be run only as a job command is ALLOCATE CHANNEL. The channel is allocated only for the execution of the job, job so it cannot be issued as a standstand alone command. There are some commands that can be issued either at the prompt or within a RUN command block, such as BACKUP DATABASE. If you issue stand-alone commands, RMAN allocates any needed channels by using the automatic channel allocation feature. You can execute stand-alone and job commands in interactive mode or batch mode.. Oracle Database 11g: Backup and Recovery Workshop 2 - 5. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Types of RMAN Commands.

(44) Job commands appear inside a RUN command block: RMAN> RUN 2> { 3> ALLOCATE CHANNEL c1 DEVICE TYPE DISK 4> FORMAT "/disk2/%U"; 5> BACKUP AS BACKUPSET DATABASE; 6> SQL 'alter system archive log current'; 7> }. Execution of the entire block starts when this line is entered. Deallocated after the RUN block completes Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Job Commands: Example Unlike stand-alone commands, job commands must appear within the braces of a RUN command Commands placed inside a RUN block as shown in the slide are run as a single command. unit of commands. Any configurations made within the run block apply within the scope of the block and override any previously made settings. The following are examples of job commands, which must appear inside a RUN block: • ALLOCATE CHANNEL • SWITCH q y If any y RMAN executes the jjob commands inside a RUN command block sequentially. command within the block fails, then RMAN ceases processing; no further commands within the block are executed. In effect, the RUN command defines a unit of command execution. When the last command within a RUN block completes, the Oracle database releases any server-side resources such as input/output (I/O) buffers or I/O slave processes allocated within the block. Note: The SQL command on line 6 is just an example. It is NOT a required command for the backup operation operation.. Oracle Database 11g: Backup and Recovery Workshop 2 - 6. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Job Commands: Example.

(45) • •. 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 pieces Exempt a tablespace from backup Enable and disable backup optimization Configure automatic backups of control files Define the archive log deletion policy Specify the parallelism for a device Set the encryption and compression parameters to be used for backups p Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Configuring Persistent Settings for RMAN To simplify ongoing use of RMAN for backup and recovery, RMAN enables you to set several persistent configuration settings for each target database database. These settings control many aspects of RMAN’s behavior. You can save persistent configuration information such as channel parameters, parallelism, and the default device type in the RMAN repository. These configuration settings are always stored in the control file and in the recovery catalog database (if it exists). These settings have default values, which allow you to use RMAN immediately. However, as you develop a more advanced backup and recovery strategy, you may have to change these settings tti to t implement i l t th thatt strategy. t t Y You can use the th CONFIGURE CO G command d tto configure fi persistent settings for RMAN backup, restore, duplication, and maintenance jobs. These settings are in effect for any RMAN session until the configuration is cleared or changed. Note: The configuration settings can be changed in an RMAN job (or session) just for the duration of the job (or session) with the SET command. Enterprise Manager Note: The same is true for using RMAN via the Enterprise Manager interface The backup settings provide the default settings for all backups taken interface. taken. When creating a backup, some of these settings can be overridden for that specific backup.. Oracle Database 11g: Backup and Recovery Workshop 2 - 7. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Configuring Persistent Settings for RMAN.

(46) To examine the persistent RMAN settings for a database: • Use the RMAN SHOW ALL command to view all configuration settings V$RMAN CONFIGURATION view to display • Query the V$RMAN_CONFIGURATION configuration settings that have been explicitly set. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Viewing Persistent Settings You can view all RMAN persistent settings by connecting to the target and using the RMAN SHOW ALL command. command You can query the V$RMAN_CONFIGURATION V$RMAN CONFIGURATION view to display configuration settings that have been explicitly set.. Oracle Database 11g: Backup and Recovery Workshop 2 - 8. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Viewing Persistent Settings.

(47) •. Use multiple streams of data to and from a device:. RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 3;. •. Use the SHOW command to list current settings:. RMAN> SHOW CONTROLFILE AUTOBACKUP FORMAT FORMAT; RMAN> SHOW EXCLUDE; RMAN> SHOW ALL;. •. Use the CLEAR option of the CONFIGURE command to reset any persistent setting to its default value:. RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR; RMAN> CONFIGURE MAXSETSIZE CLEAR; RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR;. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Managing Persistent Settings Parallelism is the number of streams of data that can be used to read from and write to the device This effectively causes that number of channels to be allocated when the device is device. used by RMAN. For example, if a media manager has two tape drives available, then parallelism 2 would allow both tape drives to be used simultaneously for BACKUP commands using that media manager. Parallelism for the disk device type is also useful, when you want to spread out a backup over multiple disks. Specify the parallelism to be used on the device using the PARALLELISM clause, like this: CONFIGURE DEVICE TYPE <device> PARALLELISM <n> where <n> is the parallelism value. Using the RMAN SHOW command, you can view the RMAN configuration settings. If SHOW ALL is executed when connected to a target database, only node-specific configurations and database configurations are displayed. You can return to the default value for any CONFIGURE command by executing the same command with the CLEAR option.. Oracle Database 11g: Backup and Recovery Workshop 2 - 9. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Managing Persistent Settings.

(48) • •. Retention policy: Describes which backups will be kept and for how long Two types of retention policies: – Recovery window: Establishes a period of time within which point-in-time recovery must be possible. Backup. Recovery window. SYSDATE. – Redundancy: Establishes a fixed number of backups that must be kept Backup 1. •. Backup 2. Retention policies are mutually exclusive.. SYSDATE. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Specifying a Retention Policy A retention policy describes which backups will be kept and for how long. You can set the value of the retention policy by using the RMAN CONFIGURE command or Enterprise Manager. Recovery Window Retention Policy The best practice is to establish a period of time during which it will be possible to discover logical errors and fix the affected objects by doing a point-in-time recovery to just before the error occurred. This period of time is called the recovery window. This policy is specified in number of days. For each data file, there must always exist at least one backup that satisfies the following condition: SYSDATE – backup_checkpoint_time >= recovery_window You can use the following command syntax to configure a recovery window retention policy: RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF <days> DAYS; where <days> y is the size of the recovery y window.. Oracle Database 11g: Backup and Recovery Workshop 2 - 10. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Specifying a Retention Policy.

(49) If you are not using a recovery catalog, then you should keep the recovery window time period less than or equal to the value of the CONTROL_FILE_RECORD_KEEP_TIME parameter to prevent p e e the e record eco d o of o older de bac backups ups from o be being go overwritten e e in the e co control o file. e If you a are e us using ga recovery catalog, then make sure the value of CONTROL_FILE_RECORD_KEEP_TIME is greater than the time period between catalog resynchronizations. Resynchronizations happen when you: • Create a backup. In this case the synchronization is done implicitly. • Execute the RESYNC CATALOG command Recoveryy catalogs g are covered in more detail in the lesson titled “Using g the RMAN Recovery y Catalog.” Redundancy Retention Policy If you require a certain number of backups to be retained, then you can set the retention policy on the basis of the redundancy option. This option requires that a specified number of backups be cataloged before any backup is identified as obsolete. The default retention policy has a redundancy of 1, which means that only one backup of a file must exist at any given time. A b k iis d backup deemed d obsolete b l t when h a more recentt version i off th the same fil file h has b been b backed k d up. You can use the following command to reconfigure a redundancy retention policy: RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY <copies>; where <copies> is the number of copies that are required for policy satisfaction. Disabling the Retention Policy You may want to disable the retention policy totally. If you have a separate system, outside of RMAN, that backs up your disk backups to tape, you may want to do this. If you disable the retention policy, then RMAN never considers a backup obsolete. Because RMAN does not have to decide when to remove a backup from disk (because another utility is managing that), RMAN does not need to be configured for making that decision. In this case, records of each backup are maintained for as long as is specified by the CONTROL_FILE_RECORD_KEEP_TIME initialization parameter. Disable the retention policy by using this command: RMAN> CONFIGURE RETENTION POLICY TO NONE; Note: You can specify that a backup is an exception to the retention policy that you have defined by creating an archival backup.. Oracle Database 11g: Backup and Recovery Workshop 2 - 11. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Specifying a Retention Policy (continued).

(50) RMAN configuration settings can not be changed for a specific RMAN session. a. True b False b.. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Answer: b. Oracle Database 11g: Backup and Recovery Workshop 2 - 12. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Quiz.

(51) In this lesson, you should have learned how to: • Describe the Enterprise Manager backup and recovery interface • Use the RMAN client command-line command line interface • Configure and manage RMAN settings. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Database 11g: Backup and Recovery Workshop 2 - 13. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Summary.

(52) This practice covers the following topics: • Determining the backup destination • Modifying the backup destination • Modifying the size of the fast recovery area. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 2-1 Overview: Configuring the Default Backup Destination In this practice you determine the default backup destination setting, change it to the +FRA disk group, group set the DB_RECOVERY_AREA_DEST_SIZE DB RECOVERY AREA DEST SIZE initialization parameter, parameter and verify that the default location is being used.. Oracle Database 11g: Backup and Recovery Workshop 2 - 14. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-1 Overview: Configuring the Default Backup Destination.

(53) This practice covers the following topics: • Setting the date and time format used by RMAN for displaying timestamps. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 2-2 Overview: Setting the Date and Time Format for RMAN In this practice, you set the date/time format that RMAN uses for displaying timestamps. The default date format does not include the time of day information information. In this workshop, workshop you will be performing several backups and recoveries in the same day and in some cases will need to determine which backup to use.. Oracle Database 11g: Backup and Recovery Workshop 2 - 15. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-2 Overview: Setting the Date and Time Format for RMAN.

(54) This practice covers the following topics: • Configuring autobackups of the control file • Configuring autobackups of the server parameter file (SPFILE). Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 2-3 Overview: Enabling Control File and SPFILE Autobackups In this practice, you configure RMAN to back up the control file and server parameter file (SPFILE) each time it takes a backup of anything in the orcl database. database. Oracle Database 11g: Backup and Recovery Workshop 2 - 16. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-3 Overview: Enabling Control File and SPFILE Autobackups.

(55) This practice covers the following topics: • Configuring the backup retention policy. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 2-4 Overview: Configuring Backup Retention Policy In this practice, you change the retention policy for backups Note that the default retention policy in Oracle Database 11g Release 2 is set to redundancy 1 1.. Oracle Database 11g: Backup and Recovery Workshop 2 - 17. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-4 Overview: Configuring Backup Retention Policy.

(56) This practice covers the following topics: • Configuring a tape device. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Practice 2-5 Overview: Configuring Devices for Backup In this practice, you configure a tape device for use in making backups.. Oracle Database 11g: Backup and Recovery Workshop 2 - 18. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Practice 2-5 Overview: Configuring Devices for Backup.

(57) THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle University and Egabi Solutions use only. C fi Configuring i for f Recoverability R bilit.

(58) After completing this lesson, you should be able to: • Configure the fast recovery area • Configure the control file to ensure appropriate protection • Configure the redo log files for recoverability • Configure ARCHIVELOG mode and the archived redo log files for recoverability. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Oracle Database 11g: Backup and Recovery Workshop 3 - 2. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Objectives.

(59) •. Permanent items: – Multiplexed copies of the current control file – Multiplexed p copies p of online redo logs g. •. Transient items: – – – – – –. Database. Archived redo logs Data file copies Control file copies Control file autobackups Backup pieces Flashback logs Fast Recovery Area Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Using a Fast Recovery Area A key component of the Oracle disk backup strategy is the fast recovery area (FRA), a storage location on a file system or Automatic Storage Management (ASM) disk group that organizes all recovery-related files and activities for an Oracle database. All files that are required to fully recover a database from media failure can reside in the fast recovery area, including control files, archived logs, data file copies, and RMAN backups. What differentiates the FRA from simply keeping your backups on disk is the FRA’s proactive space management. In addition to a location, the FRA is also assigned a quota, which represents the maximum amount of disk space that it can use at any time. For example, when new backups b k are created t d iin th the FRA and d th there iis iinsufficient ffi i t space tto h hold ld th them, b backups k and archived logs that are not needed to satisfy RMAN configuration settings (such as retention policy and archive log deletion policy) are automatically deleted to free space. The alert log contains information indicating when disk space consumption is nearing its quota and there are no additional files that can be deleted. You can then take action to correct the situation by adding more disk space, backing up files to tape, or changing the retention policy. y files are of two types: yp p permanent and transient. Permanent files are The recovery-related actively being used by the instance. Transient files are needed only in the event of some type of recovery operation. Oracle Database 11g: Backup and Recovery Workshop 3 - 3. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Using a Fast Recovery Area.

(60) Permanent Items • Control file: Depending on the setting of several initialization parameters, a copy of the control file is created in the fast recovery area location when you create a new database or control file. For details see the “Semantics” section of the CREATE CONTROLFILE command in the Oracle Database SQL Language Reference. • Multiplexed copies of online redo log files: A mirrored copy from each redo log group can be here. When you create a database, you can specify the location of the online redo log files using the LOGFILE clause. If you do not include that clause, then the locations are set according to the values of the following initialization parameters: DB_CREATE_ONLINE_LOG_DEST_n: If one or more of these variables is set, then these are the only locations used. DB_CREATE_FILE_DEST: If this is set, then this is the primary file location. DB_RECOVERY_FILE_DEST: If this is set, in addition to DB_CREATE_FILE_DEST, then this location is used as the mirror. For more details on how these variables affect the location of the online redo logs, see the LOGFILE clause l off th the CREATE DATABASE statement t t t in i the th Oracle O l D Database t b SQL L Language Reference. Transient Items • Archived redo log files: When the fast recovery area is configured, LOG_ARCHIVE_DEST_1 is automatically set to the fast recovery area location. The Archiver background process creates archived redo log files in the fast recovery area and in other configured LOG_ARCHIVE_DEST_n LOG ARCHIVE DEST n locations. locations If no LOG_ARCHIVE_DEST_n LOG ARCHIVE DEST n locations are defined, the default location for archived redo log files is in the fast recovery area. • Flashback logs: Flashback logs are generated when Flashback Database is enabled. • Control file autobackups: The default location for control file autobackups created by RMAN and autobackups generated by the Oracle database server is the fast recovery area. • Data file copies: The BACKUP AS COPY command creates image data file copies in the fast recovery area. • RMAN files: The fast recovery area is the default location that is used by RMAN for backups and restoration of the archive log content from tape for a recovery operation. Note: If you need good performance for your FRA, consider creating it on its own physical disks and controllers.. Oracle Database 11g: Backup and Recovery Workshop 3 - 4. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Using a Fast Recovery Area (continued).

(61) •. Fast recovery area: – Strongly recommended for simplified backup storage management – Storage g space p (separate ( p from working g database files)) – Location specified by the DB_RECOVERY_FILE_DEST parameter – Size specified by the DB_RECOVERY_FILE_DEST_SIZE parameter – Large enough for backups, archived logs, flashback logs, multiplexed control files, and multiplexed redo logs – Automatically managed according to your backup retention and archived redo log file deletion policies. •. Determine location, size, backup retention, and archived redo log deletion policies to configure. Copyright © 2011, Oracle and/or its affiliates. All rights reserved.. Configuring the Fast Recovery Area The fast recovery area is a space that is set aside on the disk to contain archived logs, backups flashback logs backups, logs, multiplexed control files files, and multiplexed redo logs logs. A fast recovery area simplifies backup storage management and is strongly recommended. You should place the fast recovery area on storage space that is separate from the location of your database data files and primary online log files and control file. The amount of disk space to allocate for the fast recovery area depends on the size and activity levels of your database. As a general rule, the larger the fast recovery area, the more useful it is. Ideally, the fast recovery area should be large enough for copies of your data and control t l fil files and d ffor flflashback, hb k online li redo, d and d archived hi d llogs needed d d tto recover th the d database t b with the backups kept based on the retention policy. (In short, the fast recovery area should be at least twice the size of the database so that it can hold one backup and several archived logs.) Space management in the fast recovery area is governed by the backup retention and archived redo log deletion policies. A backup retention policy determines when files are g needed to meet yyour data recovery y objectives. j obsolete,, which means that theyy are no longer The Oracle database server automatically manages this storage by deleting files that are no longer needed. Oracle Database 11g: Backup and Recovery Workshop 3 - 5. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Configuring the Fast Recovery Area.

(62) The archived redo log deletion policy specifies when archived redo logs are eligible for deletion. This deletion policy applies to all archiving destinations, including the fast recovery area. Archived c ed redo edo logs ogs ca can be de deleted e ed au automatically o a ca y by the e da database abase se server e o or as a result esu o of use userinitiated RMAN commands. Automatic deletion is only applicable for archived redo logs in the fast recovery area. The database server retains the archived redo logs in the fast recovery area as long as possible and automatically deletes eligible logs when additional disk space is required. If the fast recovery area is not large enough to hold the flashback logs and files needed to satisfy the retention policy, flashback logs from the earliest SCNs may be deleted to make room for other files files.. Oracle University and Egabi Solutions use only. THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED. Configuring the Fast Recovery Area (continued). Oracle Database 11g: Backup and Recovery Workshop 3 - 6.

References

Related documents

Although MyPHRMachines cannot ensure that genome data is used ethically by the organization performing the initial DNA sequencing, it can be used to protect patient privacy in

8 Attebery, like Irwin, distinguishes between the fantastic and fantasy: the fantastic as a mode of storytelling incorporates the whole of myth, fairy tale, magic realism,

Compared with the baseline, there was a statistically significant increase in the mean of collagen types I and III, and newly synthesized collagen, while the mean of total elastin

The algorithm will only match applicants employers preferred for NESP positions to NESP positions and applicants employers preferred for NETP positions to NETP positions. This way

In the previous sections, we dis- cuss the expectation that a neural network exploiting the fractional convolution should perform slightly worse than a pure binary (1-bit weights

If for any reason the Artist is unable to take possession of sold Works and arrange transportation to the non-local buyer, the Artist and Buyer may make arrangements with OSA

Customer to pay any amount within ten (10) days after the amount is due and payable, b) abuse of the System or the equipment, c) dissolution, termination, discontinuance,