You are previewing Oracle Database 10g RMAN Backup & Recovery.
O'Reilly logo
Oracle Database 10g RMAN Backup & Recovery

Book Description

The Most Complete Guide to Maximizing Oracle Recovery Manager

Deploy a rock-solid data backup and disaster recovery strategy with the in-depth guidance of this authoritative volume. From the exclusive publishers of Oracle Press books, Oracle Database 10g RMAN Backup & Recovery shows you, step by step, how to set up RMAN-ready databases, create reliable backup tapes and discs, and perform accurate Oracle system restores. Find out how to use RMAN from the command line and from Enterprise Manager, generate meaningful lists and reports, and automate administrative tasks using third-party media management tools. Plus, you'll learn to perform incremental backups, Flashback recoveries, and database cloning.

  • Set up, configure, and maintain Oracle Database 10g RMAN
  • Use RMAN recovery catalogs, target database packages, and control files
  • Centralize backup tape management using Oracle Secure Backup
  • Perform online, offline, and incremental system backups
  • Monitor and tune performance with Enterprise Manager Grid Control and Database Control
  • Accomplish complete and partial RMAN database restores
  • Improve functionality using VERITAS NetBackup, EMC NetWorker Module, and Tivoli Storage Manager
  • Overcome human errors using Flashback Versions Query and Transaction Query
  • Create clone and standby databases from tape and disc backups
  • Work with Real Application Cluster (RAC) databases and sync-and-split hardware technologies

Table of Contents

  1. Cover Page
  2. Oracle Database 10g RMAN Backup & Recovery
  3. Copyright Page
  4. Contents
  5. Acknowledgments
  6. Introduction
  7. PART I Getting Started with RMAN in Oracle Database 10g
    1. 1 Oracle Database 10g Backup and Recovery Architecture Tour
      1. Backup and Recovery Essentials
        1. High Availability
        2. Backup and Recovery
      2. A Few Oracle Terms to Know
      3. Controlling the Database Software
      4. Oracle Architecture
        1. The Oracle Processes
        2. Oracle Memory and RMAN
        3. The Oracle Database
        4. ARCHIVELOG Mode vs NOARCHIVELOG Mode
        5. Oracle Logical Structures
      5. The Combined Picture
        1. Startup and Shutdown of the Database
        2. Using the Database and Internals
      6. Oracle Backup and Recovery Primer
        1. Logical Backup and Recovery
        2. Oracle Physical Backup and Recovery
        3. Backing Up Other Oracle Components
      7. Summary
    2. 2 Introduction to the RMAN Architecture
      1. Server-Managed Recovery
      2. The RMAN Utility
        1. RMAN and Database Privileges
      3. The Network Topology of RMAN Backups
        1. Running RMAN Remotely
        2. Running RMAN Locally from the Target Database’s ORACLE_HOME
      4. The Database Control File
        1. Record Reuse in the Control File
        2. The Snapshot Control File
      5. The RMAN Server Processes
        1. RMAN Channel Processes
      6. The SYS Packages Used by RMAN
        1. SYS.DBMS_RCVMAN
        2. SYS.DBMS_BACKUP_RESTORE
      7. Backing Up the Data Block
        1. The Data Block Backup Overview
        2. The Benefits of Block-Level Backups
      8. RMAN in Memory
        1. Input Memory Buffers
        2. Memory Buffers on Restore
        3. RMAN Memory Utilization: PGA vs. SGA
      9. The Recovery Catalog
      10. The Auxiliary Database
      11. Compatibility Issues
        1. The Target and the RMAN Executable
        2. The Catalog Database and Catalog Schema
        3. The Auxiliary Database
      12. The RMAN Process: From Start to Finish
      13. The Flash Recovery Area
      14. Summary
  8. PART II Setup Principles and Practices
    1. 3 RMAN Setup and Configuration
      1. Configuring Your Database to Run in ARCHIVELOG Mode
        1. ARCHIVELOG Destination Directories
        2. The Flash Recovery Area
        3. Should You Use the FRA?
        4. Switching Between ARCHIVELOG Modes
        5. If You Created Your Database with the Oracle Database Configuration Assistant
        6. RMAN Workshop: Put the Database in ARCHIVELOG Mode
      2. The RMAN Command Line
        1. Connecting via the RMAN Command Line
        2. Using the RMAN connect Command
        3. Exiting the RMAN Client
      3. Configuring the Database for RMAN Operations
        1. Setting Up the Database User
        2. RMAN Workshop: Create the Target Database RMAN Backup Account
        3. Setting Up Database Security
        4. Setting the CONTROL_FILE_RECORD_KEEP_TIME Parameter
        5. Configuring RMAN Default Settings
        6. If You Are Using Shared Servers
      4. Summary of RMAN Configuration Tasks
      5. The Recovery Catalog
        1. What Is the Recovery Catalog?
        2. Creating the Recovery Catalog
        3. RMAN Workshop: Create the Recovery Catalog User Account
        4. RMAN Workshop: Create the Recovery Catalog
        5. RMAN Workshop: Register Your Database in the Recovery Catalog
        6. Backing Up and Recovering the Recovery Catalog
      6. Other Backup and Recovery Setup and Configuration Considerations
      7. Summary
    2. 4 Media Management Considerations
      1. Tape Backups in a Disk Backup World
      2. RMAN and the Media Manager: An Overview
        1. The Media Manager Catalog
        2. The Media Manager: Other Software Components
        3. Media Management Library
        4. RMAN Workshop: Test Tape Channels with the Oracle Default SBT Interface
        5. Interfacing with the MML
      3. The SBT API
      4. Back Up to Tape: From Start to Finish
      5. Restore from Tape: From Start to Finish
      6. Using sbttest and loadsbt.exe
      7. Media Management Errors
      8. Summary
    3. 5 Oracle Secure Backup
      1. Features of Oracle Secure Backup
        1. Oracle Secure Backup and Recovery Manager
        2. Differences Between OSB and OSB Express
        3. Backup Encryption
      2. Oracle Secure Backup Interfaces
      3. Oracle Secure Backup Components
        1. Host Access Modes
        2. Administrative Data
        3. Oracle Secure Backup Users and Classes
        4. Operating System Accounts
        5. NDMP Hosts
        6. Oracle Secure Backup Rights and Classes
      4. Installing Oracle Secure Backup
        1. RMAN Workshop: Install Oracle Secure Backup
      5. Enterprise Manager and Oracle Secure Backup
        1. RMAN Workshop: Configuring and Using Enterprise Manager for OSB Backups
      6. Submitting Oracle Secure Backup Jobs from RMAN
      7. Configuring Backup Storage Selectors with Enterprise Manager
      8. Configuring the Oracle Secure Backup Administrative Server
      9. Oracle Secure Backup File System Backup and Restore
      10. Summary
    4. 6 Enhancing RMAN with VERITAS NetBackup͊ for Oracle
      1. Key Features
      2. Necessary Components
      3. Storage/Media Device Configuration
      4. NetBackup Installation
        1. Pre-Installation Tasks for NetBackup for Oracle Agent
        2. NetBackup for Oracle Agent Installation Steps
      5. How to Link Oracle to NetBackup Media Manager
        1. Automatic Link Method
        2. Manual Link Method
      6. Architecture
      7. Configuring NetBackup Policies
      8. Adding New Policies
        1. Defining Schedules
        2. Defining a Backup Selection
        3. Defining Policy Clients
      9. Managing Expired Backup Images
        1. Delete Expired Backups Using NetBackup Repository
        2. Delete Expired Backups Using RMAN
      10. RMAN Sample Scripts
      11. Troubleshooting
        1. Use NetBackup Logs
        2. Determine Which Library Is in Use
      12. Security Best Practices
      13. Cost Justification
      14. Summary
      15. References
    5. 7 Configuring EMC NetWorker Module for Oracle
      1. Architecture of the Oracle and NetWorker Backup and Recovery System
        1. Backup and Restore Operations
      2. Installing NMO
        1. RMAN Workshop: NMO Installation
      3. Configuring NetWorker for Client Operating System Backups
        1. RMAN Workshop: Configure NetWorker for OS-Level Backups
      4. Running and Scheduling RMAN Backups
        1. RMAN Workshop: Configuration of the nsrnmo.SID Script
        2. Configuring NMO for Oracle Backups
      5. Creating RMAN Backup Scripts
      6. Restore Commands
      7. NSR Environment Variables
      8. Summary
    6. 8 RMAN and Tivoli Storage Manager
      1. Overview of Tivoli Storage Manager
        1. TSM Server System Objects
        2. TSM Client
        3. TSM Administration Center and Web Client
      2. TSM Installation Tasks
        1. Storage Manager for Linux Server
        2. IBM Integrated Solutions Console
        3. Storage Manager Administration
        4. TSM for Databases
      3. Configuration Tasks
        1. Creating a TSM Administrator Account
        2. Registering a TSM Client
        3. Adding a Server to ISC
        4. Adding a Storage Device
        5. Configuring TDPO
      4. Performing an RMAN Backup Using TDPO
      5. Summary
  9. PART III Using RMAN Effectively
    1. 9 RMAN Backups
      1. Benefits of RMAN Backups vs. Scripted Backups
      2. RMAN Compatibility Issues
      3. Monitoring RMAN Backup Status
      4. Offline RMAN Database Backups
        1. Offline Backups Using Default Settings
        2. RMAN Workshop: Do an Offline Backup
        3. Offline Backups Without Using Configured Defaults
      5. Backup Command Options
        1. Compression
        2. Tags
        3. Limiting Backup Impacts
        4. Limiting the Size of a Backup Set
        5. Modifying the Retention Policy for a Backup Set
        6. Overriding the configure exclude Command
        7. Checking the Database for Errors with the backup Command
        8. Skipping Offline, Inaccessible, or Read-Only Datafiles
        9. Forcing a Backup of Read-Only Datafiles
        10. Backing Up Datafiles Based on Their Last Backup Time
        11. Checking for Logical Corruption During a Backup
        12. Making Copies of Backups on Your RMAN Copier
        13. Capturing the Elusive Control File
      6. Introducing the set Command
      7. Online RMAN Database Backups
        1. Online Database Backups
        2. RMAN Workshop: Do an Online Backup
        3. Tablespace Backups
        4. Datafile Backups
        5. Archived Redo Log Backups
        6. Control File and Parameter File Backups
        7. Backup Set Backups
        8. Flash Recovery Area Backups
      8. Copies
        1. Introducing Image Copies
        2. Database, Tablespace, and Datafile Image Copies
        3. Control File Copies
        4. ARCHIVELOG Image Copies
      9. Incremental RMAN Backups
        1. The Block Change Tracking File
        2. The Base Backup
        3. Differential vs. Incremental Backups
        4. RMAN Workshop: Do an Incremental Backup
      10. Getting Started
        1. RMAN Workshop: Get Your Database Backed Up!
      11. Summary
    2. 10 RMAN Restore and Recovery
      1. RMAN Restore and Recovery Basics
      2. Before You Can Restore the Database
      3. Before RMAN Can Get Going
        1. Restoring the SPFILE
        2. Restoring the Control File
        3. RMAN Workshop: Recover Your Control File
      4. The restore and recover Commands
        1. The restore Command
        2. The recover Command
      5. Restore and Recover the Database in NOARCHIVELOG Mode
        1. Preparing for the Restore
        2. Restoring from an Older Backup
        3. Restoring to a Different Location
        4. RMAN Workshop: Recover Your NOARCHIVELOG Mode Database
      6. Database Recoveries in ARCHIVELOG Mode
        1. Point-of-Failure Database Recoveries
        2. RMAN Workshop: Complete Recovery of Your ARCHIVELOG Mode Database
        3. Tablespace Recoveries
        4. Datafile Recoveries
        5. What If I Use Incremental Backups?
      7. Summary
    3. 11 Using Oracle Enterprise Manager for Backup and Recovery
      1. Oracle Enterprise Manager 10g: The New Paradigm
      2. Grid Control
        1. The Grid Control Architecture
      3. Installing and Configuring Grid Control
        1. Resource Considerations
        2. The Oracle Universal Installer
        3. The Configuration Assistants
        4. Installing the Central Agent
        5. RMAN Workshop: Starting and Stopping All Grid Control Components
      4. Database Control
        1. The Database Control Architecture
      5. Installing and Configuring Database Control
        1. Using the Database Configuration Assistant to Configure Database Control
        2. Using Enterprise Manager Configuration Assistant to Configure Database Control
        3. RMAN Workshop: Configure Database Control Using emca
      6. Configuring Backup Settings in Enterprise Manager
        1. Device Configuration
        2. Backup Set Configuration
        3. Policy Settings
        4. What Is Missing from OEM’s Backup Configuration?
        5. RMAN Workshop: Configure Backup Settings in OEM
      7. Configuring Recovery Settings
        1. Instance Recovery
        2. Media Recovery
        3. Flash Recovery
        4. RMAN Workshop: Configure Recovery Settings in OEM
      8. Configuring Recovery Catalogs in OEM
        1. RMAN Workshop: Register the Recovery Catalog with OEM
      9. Database Backups from Enterprise Manager
        1. Oracle-Suggested Backup Strategy
        2. Scheduling a Customized Backup
        3. RMAN Script Job vs. Scheduled Backup Wizard
        4. RMAN Workshop: Create an RMAN Script Job in OEM
      10. Performing Recovery in Enterprise Manager
        1. Whole Database Recovery
        2. RMAN Workshop: Perform Database Recovery from OEM
        3. Object Level Recovery
      11. Backup Management and Reporting
        1. Managing Current Backups
        2. Managing Restore Points
        3. Creating Backup Reports
      12. Database Cloning from Enterprise Manager
      13. Summary
    4. 12 RMAN Advanced Recovery Topics
      1. Incomplete Recoveries
        1. Using the resetlogs Command
        2. Establishing a Point to Recover To
        3. Time-Based Recovery
        4. SCN-Based Recovery
        5. Log Sequence—Based Recovery
        6. Cancel-Based Recovery
      2. Other RMAN Recovery Topics
        1. Read-Only Tablespace Recovery Considerations
        2. Archived Redo Log Restores
        3. Datafile Copy Restores
        4. Recovering Corrupted Data Blocks
        5. Recovering to a Previous Incarnation
      3. Tablespace Point-In-Time Recovery
        1. Performing Automated TSPITR
        2. Manual TSPITR
        3. TSPITR Restrictions
      4. Verifying Your Backups Are Recoverable
        1. The restore preview Command
        2. Restoring with the verify and check logical Commands
        3. Using the validate backupset Command
      5. Call the Movers! Cross-Platform Database Movement and RMAN
        1. Introduction to Cross-Platform Transportable Tablespaces
        2. Byte Ordering and Datafile Conversion
        3. We Like to Move It! Move It!
      6. Summary
    5. 13 Surviving User Errors: Flashback Technologies
      1. Prepared for the Inevitable: Flashback Technology
      2. Flashback Query
        1. Flashback and the Undo Segment: A Love Story
        2. Performing Flashback Query
        3. Flashback Version Query with Oracle Enterprise Manager
        4. RMAN Workshop: Exploring Flashback Versions Query
        5. Flashback Transaction Query
        6. RMAN Workshop: Explore Flashback Transaction Query
      3. Flashback Table
        1. Performing the Flashback Table Operation from SQL
        2. Flashback Table with Oracle Enterprise Manager
        3. RMAN Workshop: Explore Flashback Table
      4. Flashback Drop
        1. The Recycle Bin
        2. RMAN Workshop: Explore Flashback Drop and the Recycle Bin
      5. Flashback Database
        1. Flashback Logs
        2. Flashback Retention Target
        3. RMAN Workshop: Configure for Flashback Database
        4. Flashback Database: Tuning and Tweaking
        5. RMAN Workshop: Perform Flashback Database
      6. Summary
    6. 14 Maintaining RMAN
      1. RMAN Maintenance
        1. Cross-Checking RMAN Backups
        2. RMAN Workshop: Using the crosscheck Command
        3. Validation of RMAN Backups
        4. Backup Retention Policies
        5. The change Command
        6. RMAN Workshop: Using the change Command
        7. The delete Command
        8. RMAN Workshop: Using the delete Command
        9. Cataloging Other Backups in RMAN
      2. Recovery Catalog Maintenance
        1. Unregistering a Database in RMAN
        2. Database Migration/Upgrade Issues
        3. Manually Resetting the Database Incarnation (reset catalog)
        4. Manually Resynchronizing the Recovery Catalog (resync catalog)
        5. Purging Recovery Catalog Records
        6. Recovery Catalog Schema Objects
      3. Backing Up the Recovery Catalog
      4. RMAN Stored Scripts
        1. Creating Stored Scripts
        2. Changing Stored Scripts
        3. Deleting Stored Scripts
        4. Using Stored Scripts
        5. Printing Stored Scripts
        6. RMAN Workshop: Using RMAN Stored Scripts
      5. When You Just Can’t Take It Anymore
      6. Summary
    7. 15 Monitoring and Reporting on RMAN
      1. The RMAN list Command
        1. Listing Incarnations
        2. Listing Backups
        3. Listing Image Copies
      2. The RMAN report Command
        1. Reporting on Datafiles That Have Not Been Backed Up Recently
        2. Reporting on Backup Redundancy or Recovery Window
        3. Reporting on Unrecoverable Operations on Datafiles
        4. Reporting on the Database Schema
        5. Reporting on Obsolete Backups
      3. Summary
    8. 16 Performance Tuning RMAN Backup and Recovery Operations
      1. Before You Tune RMAN
        1. RMAN Performance: What Can Be Achieved?
        2. Have the Right Hardware in Place
        3. Tune the Database
      2. Tuning RMAN
        1. Tuning RMAN Settings
        2. Tune the MML Layer
      3. Tuning Views You Can Use
        1. V$SESSION_LONGOPS and V$SESSION
        2. V$BACKUP_ASYNC_IO and V$BACKUP_SYNC_IO
      4. Summary
  10. PART IV RMAN in the Oracle Ecosystem
    1. 17 Duplication: Cloning the Target Database
      1. RMAN Duplication: A Primer
        1. Why Use RMAN Duplication?
        2. The Duplication Architecture
      2. Duplication: Location Considerations
        1. Duplication to the Same Server: An Overview
        2. Duplication to the Same Server, Different ORACLE_HOME
        3. Duplication to a Remote Server: An Overview
        4. Duplication and the Network
        5. RMAN Workshop: Building a Password File
      3. Duplication to the Same Server
        1. RMAN Workshop: Duplication to the Same Server, Using Disk Backups
        2. Using Tape Backups
      4. Duplication to a Remote Server
        1. RMAN Workshop: Duplication to a Remote Server, Using Disk Backups
        2. Using Tape Backups for Remote Server Duplication
        3. Incomplete Duplication: Using the DBNEWID Utility
      5. Summary
    2. 18 RMAN and Data Guard
      1. RMAN and the Standby Database
        1. Requirements for Using RMAN for Standby Database Creation
        2. The duplicate…for standby Command
        3. RMAN Workshop: Create a Standby Database Using RMAN
      2. Taking Backups from the Standby Database
        1. Datafile Backups from the Standby Database
        2. Archive Log Backups from the Standby Database
        3. Using Flashback Database for Standby Database Reinstantiation
      3. Summary
    3. 19 RMAN and Real Application Clusters
      1. Real Application Clusters: Unique Backup Challenges
        1. Datafile Backups
        2. Archive Log Backups
      2. RAC Recovery Challenges
        1. Restore Operations
        2. Media Management Considerations During a Restore
        3. Recovery Considerations After a Restore
      3. Advanced RMAN/RAC Topics
        1. Duplication to a Single-Node System
        2. RMAN Workshop: Duplicating a RAC Database to a Single-Node Database
        3. The Single-Node Standby Database
        4. RMAN Workshop: Creating a Single-Node Standby Database from a RAC Database
        5. Backing Up the Multinode RAC Database
      4. Summary
    4. 20 RMAN in Sync and Split Technology
      1. Sync and Split: Broken Mirror Backups
      2. Oracle Databases on Sync and Split Volumes
        1. Datafiles
        2. Control Files
        3. Redo Log Files
        4. Archive Logs
      3. Benefits of the Split Mirror Backup
        1. Fast Point-In-Time Recovery
        2. Speedy-Looking Backups
        3. Mounting a Split Mirror Volume on Another Server
        4. Taking Backups from the Split Mirror
      4. RMAN and Sync and Split
        1. Registering Split Mirror Copies with RMAN
        2. Taking RMAN Backups from the Split Mirror
        3. RMAN Workshop: Configure RMAN to Back Up from the Split Mirror
        4. Getting Sync and Split Functionality on the Cheap
        5. Using a Standby Database, Flashback Database, and Incremental Apply for Sync and Split
        6. Benefits of the Oracle Sync and Split Solution
      5. Summary
    5. 21 RMAN in the Workplace: Case Studies
      1. Before the Recovery
        1. What Is the Exact Nature of the Failure?
        2. What Recovery Options Are Available?
        3. Might Oracle Support Be Needed?
        4. Who Else Can Act as a Second Pair of Eyes During Recovery?
      2. Recovery Case Studies
        1. Case #1: Recovering from Complete Database Loss (NOARCHIVELOG Mode) with a Recovery Catalog
        2. Case #2: Recovering from Complete Database Loss (NOARCHIVELOG Mode) Without a Recovery Catalog
        3. Case #3: Recovering from Complete Database Loss (ARCHIVELOG Mode) Without a Recovery Catalog
        4. Case #4: Recovering from Complete Database Loss (ARCHIVELOG Mode) with a Recovery Catalog
        5. Case #5: Recovering from the Loss of the SYSTEM Tablespace
        6. Case #6: Recovering Online from the Loss of a Datafile or Tablespace
        7. Case #7: Recovering from Loss of an Unarchived Online Redo Log
        8. Case #8: Recovering Through resetlogs
        9. Case #9: Completing a Failed Duplication Manually
        10. Case #10: Using RMAN Duplication to Create a Historical Subset of the Target Database
        11. Case #11: Recovering from a Lost Datafile (ARCHIVELOG Mode) Using an Image Copy in the Flash Recovery Area
        12. Case #12: Recovering from Running the Production Datafile Out of the Flash Recovery Area
        13. Case #13: Using Flashback Database and Media Recovery to Pinpoint the Exact Moment to Open the Database with resetlogs
      3. Summary
  11. PART V Appendixes
    1. A RMAN Syntax Reference Guide
      1. RMAN Reserved Words
      2. RMAN Command List
      3. RMAN Specifier and Operands Lists
      4. RMAN Command List Syntax Details
        1. @ and @@ Commands
        2. allocate channel Command
        3. allocate channel for maintenance Command
        4. alter database Command
        5. backup Command
        6. blockrecover Command
        7. catalog Command
        8. change Command
        9. configure Command
        10. connect Command
        11. convert Command
        12. create catalog Command
        13. create script Command
        14. crosscheck Command
        15. delete Command
        16. delete script Command
        17. drop catalog Command
        18. drop database Command
        19. duplicate Command
        20. execute script Command
        21. exit Command
        22. flashback Command
        23. host Command
        24. list Command
        25. print script Command
        26. quit Command
        27. recover Command
        28. register Command
        29. release channel Command
        30. replace script Command
        31. report Command
        32. reset database Command
        33. restore Command
        34. resync Command
        35. run Command
        36. send Command
        37. set Command
        38. show Command
        39. shutdown Command
        40. spool Command
        41. SQL Command
        42. startup Command
        43. switch Command
        44. transport tablespace Command
        45. unregister database Command
        46. upgrade catalog Command
        47. validate Command
      5. RMAN Specifiers and Operands Syntax Details
        1. allocOperandList
        2. archivelogRecordSpecifier
        3. completedTimeSpec
        4. connectStringSpec
        5. datafileSpec
        6. deviceSpecifier
        7. fileNameConversionSpec
        8. formatSpec
        9. keepOption
        10. listObjList
        11. maintQualifier
        12. maintSpec
        13. obsOperandList
        14. recordSpec
        15. releaseForMaint
        16. tempfileSpec
        17. untilClause
    2. B Exploring the Recovery Catalog
    3. C Setting Up an RMAN Test Environment
      1. The Test Box
        1. Match Your Production Environment
        2. Go Cheap
      2. The Oracle Configuration
        1. Multiple Homes
        2. Creating Databases
        3. Using Oracle ASM
        4. Oracle Enterprise Manager
        5. Media Management Considerations
      3. The RMAN Configuration
  12. Index