Oracle RMAN for Absolute Beginners

Book description

Oracle RMAN for Absolute Beginners is a gentle introduction to the use of Oracle's Recovery Manager software to make backups of an Oracle database, and to restore all or part of a database in the event that data loss occurs. It is often said that a database administrator's #1 job responsibility is to be able to recover from data loss. If you're new to the Oracle platform, or you're new to database administration in general, you can hardly go wrong by making it your first priority to learn to backup and recover the database that has been entrusted into your hands.

This book is short and sweet at just 200 pages. Focus lies on the mainstream use cases. Recovery Manager, or RMAN as it is called, is a powerful and complex tool that can be intimidating at first. Author Darl Kuhn understands the need to focus on the core use cases, building your confidence in the tool, and in your ability to recover from lost database files, and even to recover your entire database should that become necessary.

Oracle RMAN for Absolute Beginners shows how to backup your database. That's the first job. You'll learn to backup the entire database, and to create incremental backups that in turn can speed restore and recovery operations. Then you'll learn to recover from lost data files, lost redo log files, lost control files, and even to restore the entire database from scratch. You'll even learn how to clone a database for development and test purposes by backing the database up on one system and restoring it onto another.

Author Darl Kuhn has a decade and a half of experience in writing about, and teaching Oracle Database backup and recovery. If you are newly responsible for an Oracle Database, you can hardly do better than to pick up a copy of Oracle RMAN for Absolute Beginners.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. Acknowledgments
  9. Introduction
  10. Chapter 1: Getting Started
    1. Connecting to Your Database
      1. Establishing OS Variables
      2. Using OS Authentication
      3. Using a Password File
    2. Starting the Database
    3. Stopping the Database
    4. Summary
  11. Chapter 2: Files in Support of Backup and Recovery Operations
    1. Managing Control Files
      1. Viewing Control File Names and Locations
      2. Adding a Control File
      3. Moving a Control File
      4. Removing a Control File
    2. Managing Online Redo Logs
      1. Displaying Online Redo Log Information
      2. Determining the Optimal Size of Online Redo Log Groups
      3. Determining the Optimal Number of Redo Log Groups
      4. Adding Online Redo Log Groups
      5. Resizing and Dropping Online Redo Log Groups
      6. Adding Online Redo Log Files to a Group
      7. Removing Online Redo Log Files from a Group
      8. Moving or Renaming Redo Log Files
    3. Implementing Archivelog Mode
      1. Making Architectural Decisions
      2. Setting the Archive Redo File Location
      3. Enabling Archivelog Mode
      4. Disabling Archivelog Mode
      5. Reacting to a Lack of Disk Space in Your Archive Log Destination
      6. Backing Up Archive Redo Log Files
    4. Managing Tablespaces and Data files
      1. Understanding the First Five
      2. Understanding the Need for More
      3. Creating Tablespaces
      4. Renaming a Tablespace
      5. Controlling the Generation of Redo
      6. Changing a Tablespace’s Write Mode
      7. Dropping a Tablespace
      8. Using Oracle Managed Files
      9. Creating a Bigfile Tablespace
      10. Enabling Default Table Compression within a Tablespace
      11. Displaying Tablespace Size
      12. Altering Tablespace Size
      13. Toggling Data Files Offline and Online
      14. Renaming or Relocating a Data File
    5. Summary
  12. Chapter 3: User-Managed Backup and Recovery
    1. Implementing a Cold-Backup Strategy for a Noarchivelog Mode Database
      1. Making a Cold Backup of a Noarchivelog Mode Database
      2. Restoring a Cold Backup in Noarchivelog Mode with Online Redo Logs
      3. Restoring a Cold Backup in Noarchivelog Mode Without Online Redo Logs
      4. Scripting a Cold Backup and Restore
    2. Making a Cold Backup of an Archivelog Mode Database
    3. Implementing a Hot Backup Strategy
      1. Making a Hot Backup
      2. Scripting Hot Backups
      3. Understanding the Split-Block Issue
      4. Understanding the Need for Redo Generated During Backup
      5. Understanding That Data Files Are Updated
    4. Performing a Complete Recovery of an Archivelog Mode Database
      1. Restoring and Recovering with the Database Offline
      2. Restoring and Recovering with a Database Online
      3. Restoring Control Files
    5. Performing an Incomplete Recovery of an Archivelog Mode Database
    6. Summary
  13. Chapter 4: Configuring RMAN
    1. Understanding RMAN
    2. Starting RMAN
    3. RMAN Architectural Decisions
      1. 1. Running the RMAN Client Remotely or Locally
      2. 2. Specifying the Backup User
      3. 3. Using Online or Offline Backups
      4. 4. Setting the Archive Redo Log Destination and File Format
      5. 5. Configuring the RMAN Backup Location and File Format
      6. 6. Setting the Autobackup of the Control File
      7. 7. Specifying the Location of the Autobackup of the Control File
      8. 8. Backing Up Archive Redo Logs
      9. 9. Determining the Location for the Snapshot Control File
      10. 10. Using a Recovery Catalog
      11. 11. Using a Media Manager
      12. 12. Setting the CONTROL_FILE_RECORD_KEEP_TIME Initialization Parameter
      13. 13. Configuring RMAN’s Backup Retention Policy
      14. 14. Configuring the Archive Redo Logs’ Deletion Policy
      15. 15. Setting the Degree of Parallelism
      16. 16. Using Backup Sets or Image Copies
      17. 17. Using Incremental Backups
      18. 18. Using Incrementally Updated Backups
      19. 19. Using Block Change Tracking
      20. 20. Configuring Binary Compression
      21. 21. Configuring Encryption
      22. 22. Configuring Miscellaneous Settings
      23. 23. Configuring Informational Output
    4. Segueing from Decision to Action
    5. Summary
  14. Chapter 5: RMAN Backups and Reporting
    1. Preparing to Run RMAN Backup Commands
      1. Setting NLS_DATE_FORMAT
      2. Setting ECHO Setting ECHO
      3. Showing Variables
    2. Running Backups
      1. Backing Up the Entire Database
      2. Backing Up Tablespaces
      3. Backing Up Data Files
      4. Backing Up the Control File
      5. Backing up the spfile
      6. Backing Up Archive Redo Logs
      7. Backing Up FRA
      8. Excluding Tablespaces from Backups
      9. Backing Up Data Files Not Backed Up
      10. Skipping Read-Only Tablespaces
      11. Skipping Offline or Inaccessible Files
      12. Backing Up Large Files in Parallel
      13. Adding RMAN Backup Information to the Repository
    3. Taking Backups of Pluggable Databases
      1. While Connected to the Root Container
      2. While Connected to a Pluggable Database
    4. Creating Incremental Backups
      1. Taking Incremental-Level Backups
      2. Making Incrementally Updating Backups
      3. Using Block Change Tracking
    5. Checking for Corruption in Data Files and Backups
      1. Using VALIDATE
      2. Using BACKUP...VALIDATE
      3. Using RESTORE...VALIDATE
    6. Using a Recovery Catalog
      1. Creating a Recovery Catalog
      2. Registering a Target Database
      3. Backing Up the Recovery Catalog
      4. Synchronizing the Recovery Catalog
      5. Recovery Catalog Versions
      6. Dropping a Recovery Catalog
    7. Logging RMAN Output
      1. Redirecting Output to a File
      2. Capturing Output with Linux/Unix Logging Commands
      3. Logging Output to a File
      4. Querying for Output in the Data Dictionary
    8. RMAN Reporting
      1. Using LIST
      2. Using REPORT
      3. Using SQL
    9. Summary
  15. Chapter 6: RMAN Restore and Recovery
    1. Determining if Media Recovery Is Required
    2. Determining What to Restore
      1. How the Process Works
      2. Using Data Recovery Advisor
    3. Using RMAN to Stop/Start Oracle
      1. Shutting Down
      2. Starting Up
    4. Complete Recovery
      1. Testing Restore and Recovery
      2. Restoring and Recovering the Entire Database
      3. Restoring and Recovering Tablespaces
      4. Restoring Read-Only Tablespaces
      5. Restoring Temporary Tablespaces
      6. Restoring and Recovering Data Files
      7. Restoring Data Files to Nondefault Locations
      8. Performing Block-Level Recovery
      9. Restoring a Container Database and Its Associated Pluggable Databases
    5. Restoring Archive Redo Log Files
      1. Restoring to the Default Location
      2. Restoring to a Nondefault Location
    6. Restoring a Control File
      1. Using a Recovery Catalog
      2. Using an Autobackup
      3. Specifying a Backup File Name
    7. Restoring the spfile
    8. Incomplete Recovery
      1. Determining the Type of Incomplete Recovery
      2. Performing Time-Based Recovery
      3. Performing Log Sequence-Based Recovery
      4. Performing SCN-Based Recovery
      5. Restoring to a Restore Point
      6. Restoring Tables to a Previous Point
    9. Flashing Back a Table
      1. FLASHBACK TABLE TO BEFORE DROP
      2. Flashing Back a Table to a Previous Point in Time
    10. Flashing Back a Database
    11. Restoring and Recovering to Different Server
      1. Step 1. Create an RMAN Backup on the Originating Database
      2. Step 2. Copy the RMAN Backup to the Destination Server
      3. Step 3. Ensure That Oracle Is Installed
      4. Step 4. Source the Required OS Variables
      5. Step 5. Create an init.ora File for the Database to Be Restored
      6. Step 6. Create Any Required Directories for Data Files, Control Files, and Dump/Trace Files
      7. Step 7. Start Up the Database in Nomount Mode
      8. Step 8. Restore the Control File from the RMAN Backup
      9. Step 9. Start Up the Database in Mount Mode
      10. Step 10. Make the Control File Aware of the Location of the RMAN Backups
      11. Step 11. Rename and Restore the Data Files to Reflect New Directory Locations
      12. Step 12. Recover the Database
      13. Step 13. Set the New Location for the Online Redo Logs
      14. Step 14. Open the Database
      15. Step 15. Add the Temp File
      16. Step 16. Rename the Database
    12. Summary
  16. Chapter 7: Handling Online Redo Log Failures
    1. Determining a Course of Action
    2. Restoring After Losing One Member of Multiplexed Group
    3. Recovering After Loss of All Members of Inactive Redo Log Group
      1. Dropping a Log File Group
    4. Recovering After Loss of All Members of Active Redo Log Group
    5. Recovering After Loss of All Members of Current Redo Log Group
    6. Summary
  17. Chapter 8: Data Pump
    1. Data Pump Architecture
    2. Getting Started
      1. Taking an Export
      2. Importing a Table
      3. Using a Parameter File
    3. Exporting and Importing with Granularity
      1. Exporting and Importing an Entire Database
      2. Schema Level
      3. Table Level
      4. Tablespace Level
    4. Transferring Data
      1. Exporting and Importing Directly Across the Network
      2. Copying Data Files
    5. Features for Manipulating Storage
      1. Exporting Tablespace Metadata
      2. Specifying Different Data File Paths and Names
      3. Importing into a Tablespace Different from the Original
      4. Changing the Size of Data Files
      5. Changing Segment and Storage Attributes
    6. Filtering Data and Objects
      1. Specifying a Query
      2. Exporting a Percentage of the Data
      3. Excluding Objects from the Export File
      4. Excluding Statistics
      5. Including Only Specific Objects in an Export File
      6. Exporting Table, Index, Constraint, and Trigger DDL
      7. Excluding Objects from Import
      8. Including Objects in Import
    7. Common Data Pump Tasks
      1. Estimating the Size of Export Jobs
      2. Listing the Contents of Dump Files
      3. Cloning a User
      4. Creating a Consistent Export
      5. Importing When Objects Already Exist
      6. Renaming a Table
      7. Remapping Data
      8. Suppressing a Log File
      9. Using Parallelism
      10. Specifying Additional Dump Files
      11. Reusing Output File Names
      12. Creating a Daily DDL File
      13. Compressing Output
      14. Changing Table Compression Characteristics on Import
      15. Encrypting Data
      16. Exporting Views As Tables
      17. Disabling Logging of Redo on Import
    8. Interactive Command Mode
      1. Entering Interactive Command Mode
      2. Attaching to a Running Job
      3. Stopping and Restarting a Job
      4. Terminating a Data Pump Job
    9. Monitoring Data Pump Jobs
      1. Data Pump Log File
      2. Data Dictionary Views
      3. Database Alert Log
      4. Status Table
      5. Interactive Command Mode Status
      6. OS Utilities
    10. Data Pump Legacy Mode
      1. Data Pump Mapping to the exp Utility
      2. Data Pump Mapping to the imp Utility
    11. Summary
  18. Index

Product information

  • Title: Oracle RMAN for Absolute Beginners
  • Author(s): Darl Kuhn
  • Release date: November 2014
  • Publisher(s): Apress
  • ISBN: 9781484207635