Book description
RMAN Recipes for Oracle Database 12c is an example-driven approach to the Oracle database administrator's #1 job responsibility:
Be able to recover the database.
Of all the things you are responsible for as database administrator, nothing is more important than the data itself. Like it or not, the fearsome responsibility of protecting your organization's most critical data falls squarely upon your shoulders:
Lose that data and your company could fail.
Lose that data and you could be out of a job.
Oracle's flagship database product fortunately implements a wide-ranging feature set to aid you in the all-important task of safeguarding against data loss. Recovery Manager, or RMAN, is at the heart of that feature set, and is the tool most-often used to initiate database backup and recovery operations. In this book, well-known authors and database experts Darl Kuhn, Sam Alapati, and Arup Nanda have created a set of examples encompassing the gamut of backup and recovery tasks that you might need to perform.
Sometimes, especially when the heat is on, a good example is what you need to get started towards a solution. RMAN Recipes for Oracle Database 12c delivers. It'll be the book you reach for when that dreaded call comes in at 3:00am some dreary morning. It'll be the book that lets you sleep at night knowing that no matter what transpires, that you've done your job well and can recover from any outage. RMAN Recipes for Oracle Database 12c gets right to the point with quick and easy-to-read, step-by-step solutions that can help you backup and recover your data with confidence.
What you'll learn
Reliably back up and recover your database using Oracle's Recovery Manager
Let Oracle Database manage your backup files via the Fast Recovery Area
Automate backup and recovery tasks by writing scripts
Troubleshoot RMAN problems and optimize RMAN performance
Recover from the loss of a control file, loss of an online redo log, and from other unusual situations
Who this book is for
RMAN Recipes for Oracle Database 12c is aimed squarely at Oracle database administrators responsible for database backup and recovery operations.
Table of contents
- Title Page
- Dedication
- Contents at a Glance
- Contents
- Foreword
- About the Authors
- About the Technical Reviewers
- Acknowledgments
- Introduction
- CHAPTER 1: Backup and Recovery 101
- CHAPTER 2: Jump-Starting RMAN
-
CHAPTER 3: Using the Fast Recovery Area
- 3-1. Creating the Fast Recovery Area
- 3-2. Writing Regular RMAN Backups to the FRA
- 3-3. Freeing FRA Space in an Emergency
- 3-4. Checking Space Usage in the FRA
- 3-5. Expanding or Shrinking the FRA
- 3-6. Configuring Archived Redo Logs to Go to FRA
- 3-7. Using the Same FRA for Two Databases with the Same Name
- 3-8. Placing a Control File in the FRA
- 3-9. Placing Online Redo Log Files in FRA
- 3-10. Sending Image Copies to the FRA
- 3-11. Deleting Backup Sets from the FRA
- 3-12. Deleting Archived Redo Logs from the FRA
- 3-13. Reinstating a Damaged Data File from an Image Copy
- 3-14. Switching Back from an Image Copy
- 3-15. Backing Up the FRA to Tape
- 3-16. Sizing the Fast Recovery Area
-
CHAPTER 4: Using RMAN
- 4-1. Starting the RMAN Client
- 4-2. Issuing RMAN Commands
- 4-3. Saving RMAN Output to a Text File
- 4-4. Logging Command-Line RMAN Output
- 4-5. Connecting to a Target Database from the RMAN Prompt
- 4-6. Connecting to a Target Database from the Operating System Command Line
- 4-7. Executing Operating System Commands from Within RMAN
- 4-8. Scripting RMAN
- 4-9. Executing RMAN Command Files
- 4-10. Creating Dynamic Command Files
- 4-11. Connecting to an Auxiliary Database
- 4-12. Executing Multiple RMAN Commands as a Single Unit
- 4-13. Issuing SQL Statements from the RMAN Client
- 4-14. Starting and Shutting Down a Database with RMAN
- 4-15. Checking the Syntax of RMAN Commands
- 4-16. Hiding Passwords When Connecting to RMAN
- 4-17. Identifying RMAN Server Sessions
- 4-18. Dropping a Database Using the RMAN Client
-
CHAPTER 5: Configuring the Rman Environment
- 5-1. Showing RMAN Configuration Settings
- 5-2. Configuring RMAN
- 5-3. Restoring Default Parameter Settings
- 5-4. Enabling and Disabling Automatic Control File Backups
- 5-5. Specifying the Auto Backup Control File Directory and File Name
- 5-6. Specifying the Snapshot Control File’s Name and Location
- 5-7. Specifying the Retention Period for RMAN History
- 5-8. Configuring the Default Device Type
- 5-9. Configuring the Default Backup Type
- 5-10. Making Compressed Backup Sets the Default
- 5-11. Configuring Multiple Backup Copies
- 5-12. Skipping Previously Backed-Up Files
- 5-13. Specifying Backup Piece File Names
- 5-14. Generating File Names for Image Copies
- 5-15. Tagging RMAN Backups
- 5-16. Configuring Automatic Channels
- 5-17. Manually Allocating RMAN Channels
- 5-18. Allocating an RMAN Maintenance Channel
- 5-19. Creating a Backup Retention Policy
- 5-20. Configuring an Archived Redo Log Deletion Policy
- 5-21. Limiting the Size of Individual Backup Pieces
- 5-22. Configuring the Maximum Size of Backup Sets
-
CHAPTER 6: Using the Recovery Catalog
- 6-1. Creating the Recovery Catalog
- 6-2. Granting Restricted Access
- 6-3. Connecting to the Catalog from the Command Line
- 6-4. Connecting to the Catalog from the RMAN Prompt
- 6-5. Registering Target Databases
- 6-6. Unregistering a Database
- 6-7. Cataloging Older Files
- 6-8. Updating the Recovery Catalog
- 6-9. Dropping the Recovery Catalog
- 6-10. Merging Recovery Catalogs
- 6-11. Moving the Recovery Catalog to Another Database
- 6-12. Creating a High-Availability Recovery Catalog
- 6-13. Viewing Backup Information
- 6-14. Uncataloging RMAN Records
- 6-15. Using a Release 12.x Client with Older Catalogs
-
CHAPTER 7: Making Backups with RMAN
- Key Concepts
- 7-1. Specifying Backup Options
- 7-2. Backing Up the Control File
- 7-3. Backing Up the Server Parameter File
- 7-4. Backing Up Data Files
- 7-5. Backing Up Tablespaces
- 7-6. Making a Whole-Database Backup
- 7-7. Backing Up Archived Redo Logs
- 7-8. Backing Up Everything
- 7-9. Backing Up Recovery Files in the FRA
- 7-10. Performing Incremental Backups
- 7-11. Reducing Incremental Backup Time
- 7-12. Creating Multiple Backup Sets
- 7-13. Making Copies of Backup Sets
- 7-14. Making Copies of Image Copy Backups
- 7-15. Making Tape Copies of Disk-Based Image Copies
- 7-16. Excluding a Tablespace from a Backup
- 7-17. Skipping Read-Only, Offline, or Inaccessible Files
- 7-18. Encrypting RMAN Backups
- 7-19. Making a Compressed Backup
- 7-20. Parallelizing Backups
- 7-21. Making Faster Backups of Large Files
- 7-22. Specifying Backup Windows
- 7-23. Reusing RMAN Backup Files
- 7-24. Retaining Backups for a Long Time
- 7-25. Backing Up Only Those Files Previously Not Backed Up
- 7-26. Restarting Backups After a Crash
- 7-27. Updating Image Copies
- 7-28. Backing Up a Container Database
- 7-29. Backing Up the Root in a Container Database
- 7-30. Backing Up a Pluggable Database
- 7-31. Backing Up Tablespaces and Data Files in a PDB
-
CHAPTER 8: Maintaining RMAN Backups and the Repository
- 8-1. Adding User-Made Backups to the Repository
- 8-2. Finding Data Files and Archive Logs that Need a Backup
- 8-3. Finding Data Files Affected by Unrecoverable Operations
- 8-4. Identifying Obsolete Backups
- 8-5. Displaying Information About Database Files
- 8-6. Listing RMAN Backups
- 8-7. Listing Expired Backups
- 8-8. Listing Only Recoverable Backups and Copies
- 8-9. Listing Restore Points
- 8-10. Listing Database Incarnations
- 8-11. Updating the RMAN Repository After Manually Deleting Backups
- 8-12. Synchronizing the Repository with the Actual Backups
- 8-13. Deleting Backups
- 8-14. Deleting Archived Redo Logs
- 8-15. Deleting Obsolete RMAN Backups
- 8-16. Changing the Status of an RMAN Backup Record
- 8-17. Changing the Status of Archival Backups
- 8-18. Testing the Integrity of an RMAN Backup
- 8-19. Validating Data Files, Backup Sets, and Data Blocks
-
CHAPTER 9: Scripting RMAN
- Approaches to Scripting
- 9-1. Developing a Unix Shell Script for RMAN
- 9-2. Scheduling a Unix Shell File
- 9-3. Developing a Windows Batch File to Run RMAN
- 9-4. Scheduling a Script in Windows via the GUI
- 9-5. Changing the Schedule of a Batch Job in the Task Scheduler
- 9-6. Scheduling in Windows from the Command Line
- 9-7. Creating Local Stored Scripts
- 9-8. Creating a Global Stored Script
- 9-9. Updating Stored Scripts
- 9-10. Commenting on Stored Scripts
- 9-11. Displaying Stored Scripts
- 9-12. Listing Stored Scripts
- 9-13. Dropping Stored Scripts
- 9-14. Executing a Global Script When a Local Script of the Same Name Exists
- 9-15. Converting Stored Scripts to Files
- 9-16. Creating or Replacing a Stored Script from a File
- 9-17. Passing Parameters to Stored Scripts
- 9-18. Creating a Parameterized Command File Script
-
CHAPTER 10: Restoring the Control File
- 10-1. Restoring Control File Using Fast Recovery Area
- 10-2. Restoring Control File Using Recovery Catalog
- 10-3. Determining the Database Identifier
- 10-4. Restoring Control File with No Fast Recovery Area or Recovery Catalog
- 10-5. Restoring Control File to Nondefault Location
- 10-6. Restoring Lost Copy of Multiplexed Control File
- 10-7. Re-creating the Control File
- 10-8. Restoring the Control File Using DBMS_BACKUP_RESTORE
-
CHAPTER 11: Performing Complete Recovery
- Background
- If You’re Still Awake . . .
- 11-1. Determining How to Restore and Recover
- 11-2. Viewing Backup Files Needed for Restore
- 11-3. Verifying Integrity of Backup Files
- 11-4. Testing Media Recovery
- 11-5. Performing Database-Level Recovery
- 11-6. Performing Tablespace-Level Recovery
- 11-7. Performing Data File–Level Recovery
- 11-8. Restoring Data Files to Nondefault Locations
- 11-9. Performing Block-Level Recovery
- 11-10. Restoring Temporary Tablespaces
- 11-11. Forcing RMAN to Restore a File
- 11-12. Restoring from an Older Backup
- 11-13. Recovering Through Resetlogs
- 11-14. Restoring the spfile
- 11-15. Restoring Archived Redo Log Files
- 11-16. Deleting Archived Redo Log Files During Recovery
- 11-17. Recovering Data Files Not Backed Up
- 11-18. Restoring from Uncataloged Backup Pieces
- 11-19. Restoring Data Files Using DBMS_BACKUP_RESTORE
- 11-20. Restoring a Container Database and/or Its Associated Pluggable Databases
- 11-21. Restoring and Recovering to a Different Server
-
CHAPTER 12: Performing Incomplete Recovery
- Background
- 12-1. Determining Type of Incomplete Recovery
- 12-2. Performing Time-Based Recovery
- 12-3. Performing Log Sequence–Based Recovery
- 12-4. Performing Cancel-Based Recovery
- 12-5. Using LogMiner to Find an SCN
- 12-6. Performing Change/SCN-Based Recovery
- 12-7. Recovering to a Restore Point
- 12-8. Restoring a Noarchivelog Mode Database
- 12-9. Recovering to a Previous Incarnation
- 12-10. Performing Tablespace Point-in-Time Recovery
- 12-11. Recovering a Subset of Data Files
- 12-12. Performing Incomplete Recovery on a Pluggable Database
- 12-13. Troubleshooting Incomplete Recovery
-
CHAPTER 13: Performing Flashback Recovery
- Introducing Flashback
- 13-1. Checking the Flashback Status of a Database
- 13-2. Enabling Flashback on a Database
- 13-3. Disabling Flashback on a Database
- 13-4. Flashing Back a Database from RMAN
- 13-5. Flashing Back a Database from SQL
- 13-6. Finding Out How Far Back into the Past You Can Flash Back
- 13-7. Estimating the Amount of Flashback Logs Generated at Various Times
- 13-8. Estimating the Space Occupied by Flashback Logs in the Fast Recovery Area
- 13-9. Creating Normal Restore Points
- 13-10. Creating Guaranteed Restore Points
- 13-11. Listing Restore Points
- 13-12. Dropping Restore Points
- 13-13. Recovering a Dropped Table
- 13-14. Undropping a Table When Another Exists with the Same Name
- 13-15. Undropping a Specific Table from Two Dropped Tables with the Same Name
- 13-16. Checking the Contents of the Recycle Bin
- 13-17. Restoring Dependent Objects of an Undropped Table
- 13-18. Turning Off the Recycle Bin
- 13-19. Clearing the Recycle Bin
- 13-20. Querying the History of a Table Row (Flashback Query)
- 13-21. Flashing Back a Specific Table
- 13-22. Recovering a Specific Table from Backup
- 13-23. Recovering a Partition
- 13-24. Recovering a Table into a Different Name
- 13-25. Recovering a Table into a Different Tablespace
- 13-26. Creating an Export Dump of a Table to be Recovered
-
CHAPTER 14: Handling Online Redo Log Failures
- How Redo Logs Work
- 14-1. Determining a Course of Action
- 14-2. Restoring After Losing One Member of a Multiplexed Group
- 14-3. Recovering After Loss of All Members of the INACTIVE Redo Log Group
- 14-4. Recovering After Loss of All Members of the ACTIVE Redo Log Group
- 14-5. Recovering After Loss of All Members of the CURRENT Redo Log Group
-
CHAPTER 15: Duplicating Databases and Transporting Data
- 15-1. Renaming Database Files in a Duplicate Database
- 15-2. Specifying Alternative Names for OMF or ASM File Systems
- 15-3. Creating a Duplicate Database from RMAN Backups
- 15-4. Duplicating a Database Without Using RMAN Backups
- 15-5. Specifying Options for Network-based Active Database Duplication
- 15-6. Duplicating a Database with Several Directories
- 15-7. Duplicating a Database to a Past Point in Time
- 15-8. Skipping Tablespaces During Database Duplication
- 15-9. Duplicating a Database with a Specific Backup Tag
- 15-10. Resynchronizing a Duplicate Database
- 15-11. Duplicating Pluggable Databases and Container Databases
- 15-12. Transporting Tablespaces on the Same Operating System Platform
- 15-13. Performing a Cross-Platform Tablespace Transport by Converting Files on the Source Host
- 15-14. Performing a Cross-Platform Tablespace Transport by Converting Files on the Destination Host
- 15-15. Transporting a Database by Converting Files on the Source Database Platform
- 15-16. Transporting Tablespaces to a Different Platform Using RMAN Backup Sets
- 15-17. Transporting a Database to a Different Platform Using RMAN Backup Sets
-
CHAPTER 16: Tuning RMAN
- 16-1. Identifying RMAN Processes
- 16-2. Monitoring RMAN Job Progress
- 16-3. Measuring Backup Performance
- 16-4. Determining Whether Repository Queries Are a Bottleneck
- 16-5. Enabling SQL Tracing for an RMAN Session
- 16-6. Determining Whether Bottleneck Is Read or Write
- 16-7. Identifying I/O Bottlenecks
- 16-8. Improving Tape I/O Performance
- 16-9. Maximizing Throughput to Backup Device
- 16-10. Tuning Media Recovery
- 16-11. Slowing RMAN Down
- 16-12. Improving Performance Through Parallelism
- 16-13. Speeding Up Compressed Backup Sets
- 16-14. Improving Performance Using Incremental Features
- 16-15. Setting the Large Pool Size
-
CHAPTER 17: Troubleshooting RMAN
- 17-1. Determining Where to Start
- 17-2. Resolving Connection Permission Issues
- 17-3. Handling Disk Space Issues
- 17-4. Dealing with the RMAN-06059 Error
- 17-5. Terminating RMAN Processes
- 17-6. Diagnosing NLS Character Set Issues
- 17-7. Logging RMAN Output
- 17-8. Viewing RMAN Command History
- 17-9. Enabling RMAN’s Debug Output
- 17-10. Enabling Granular Time Reporting
- 17-11. Working with Oracle Support
- 17-12. Resolving RMAN Compatibility Issues
- 17-13. Dealing with an ORA-19511 Error
- 17-14. Dealing with an ORA-27211 Error
- 17-15. Dealing with an ORA-04031 Error
- 17-16. Managing Files in an ASM Environment
- 17-17. Automatically Determining Whether Backups Are Working
-
CHAPTER 18: Using Oracle Secure Backup as a Media Management Layer
- A Quick Introduction
- 18-1. Installing Oracle Secure Backup on Linux
- 18-2. Verifying the MML Installation
- 18-3. Working with obtool
- 18-4. Using obtool in Noninteractive Mode
- 18-5. Configuring an OSB Virtual Device
- 18-6. Configuring RMAN to Work with Oracle Secure Backup
- 18-7. Configuring RMAN Access to the Oracle Secure Backup sbt Library
- 18-8. Managing Authorized OSB Accounts
- 18-9. Creating OSB Media Families for RMAN Backups
- 18-10. Creating an OSB Database Backup Storage Selector
- 18-11. Configuring OSB Parameters in RMAN
- 18-12. Making Oracle Database Backups Using Oracle Secure Backup
- 18-13. Restoring Using Oracle Secure Backup
- 18-14. Accessing RMAN Backup Data in Oracle Secure Backup
- CHAPTER 19: Performing Backup and Recovery with Enterprise Manager
- CHAPTER 20: Using the Data Recovery Advisor
-
CHAPTER 21: Using RMAN on Windows
- 21-1. Understanding Oracle Database Architecture on Windows
- 21-2. Monitoring Threads on Windows
- 21-3. Identifying Oracle Home and SID on Windows
- 21-4. Setting Oracle Groups on Windows
- 21-5. Setting Path for Oracle Binaries on Windows
- 21-6. Managing Oracle via Management Console
- 21-7. Killing Oracle Processes in Windows
- 21-8. Choosing Oracle Homes
- 21-9. Copying Open Files in Windows
- 21-10. Connecting as sysdba Using OS Authentication
- 21-11. Simulating a Failure
- 21-12. Creating a Fast Recovery Area
- 21-13. Placing Data Files, Control Files, and Online and Archived Redo Log Files in the FRA
- 21-14. Switching Back from Image Copies
- 21-15. Using the Fast Recovery Area
- 21-16. Developing a Windows Batch File
- 21-17. Scheduling Windows Jobs
- 21-18. Transporting Tablespaces to/from Windows
- 21-19. Transporting an Entire Database to/from Windows
-
CHAPTER 22: RMAN in an Oracle Data Guard Environment
- 22-1. Synchronizing a Physical Standby Database
- 22-2. Configuring Archive Log Deletion Policies on the Primary and Standby Databases
- 22-3. Instantiating a Standby Database with RMAN
- 22-4. Resynchronizing After Structural Changes on the Primary Database
- 22-5. Implementing Oracle’s Recommended Backup Strategy
- 22-6. Recovering from the Loss of Data Files
- 22-7. Recovering Data Files on the Primary Database
- 22-8. Recovering the Control File(s) of a Standby Database
- 22-9. Recovering File(s) for a Primary Database
- 22-10. Configuring RMAN on a Primary Database
- 22-11. Configuring RMAN in a Standby Database
- 22-12. Registering Databases in a Data Guard Environment
- 22-13. Maintaining RMAN Backups in a Data Guard Environment
- 22-14. Reinstating a Physical Standby Using RMAN Backups
- CHAPTER 23: RMAN and RAC
- CHAPTER 24: RMAN and ASM
- CHAPTER 25: RMAN in Exadata
- Index
Product information
- Title: RMAN Recipes for Oracle Database 12c: A Problem-Solution Approach, Second Edition
- Author(s):
- Release date: July 2013
- Publisher(s): Apress
- ISBN: 9781430248361
You might also like
book
Oracle Database 12c Release 2 Multitenant
Master the Powerful Multitenant Features of Oracle Database 12c Govern a scalable, extensible, and highly available …
book
Oracle Database 11g Performance Tuning Recipes: A Problem-Solution Approach
Performance problems are rarely "problems" per se. They are more often "crises" during which you're pressured …
book
Oracle Database 12c New Features
Maximize the New and Improved Features of Oracle Database 12 c Written by Master Principle Database …
book
Expert Consolidation in Oracle Database 12c
Expert Consolidation in Oracle Database 12c is your key to reducing data management costs and increasing …