- •About the Authors
- •Contents at a Glance
- •Contents
- •Table of Exercises
- •Introduction
- •Assessment Test
- •Answers to Assessment Test
- •What Is ASM?
- •Working with the ASM Instance
- •Overview of ASM Data Dictionary Views
- •Using ASM Storage
- •Using RMAN with ASM
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Understanding the Oracle Database as It Relates to Backup and Recovery
- •Performing Oracle Offline Backups
- •Performing Oracle Online Backups
- •Backing Up the Control File
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Performing Incomplete Recoveries
- •Performing Other Types of Recoveries
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Why Use RMAN?
- •Exploring the RMAN Architecture
- •Connecting to RMAN
- •Configuring RMAN for Use
- •Backing Up Your Database with RMAN
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Introducing the Recovery Catalog
- •Creating the Recovery Catalog User and Schema Objects
- •Using a Recovery Catalog
- •Maintaining the Recovery Catalog
- •Using the RMAN Virtual Private Catalog
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •RMAN Database-Recovery Basics
- •Using Image Copies to Recover Your Database
- •Other Basic Recovery Topics
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Switching Between RMAN Incarnations
- •Overview of RMAN Database Duplication
- •Performing an RMAN Tablespace Point-in-Time Recovery
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Overview of Flashback Technology
- •Using Automatic Undo Management
- •Using Flashback Technologies
- •Using Additional Flashback Operations
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Diagnosing the Database
- •Managing Database Performance
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Managing Memory
- •Managing Space
- •Managing Resources
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Automating Tasks with the Scheduler
- •Exploring the Scheduler Architecture
- •Exploring Common Administration Tools
- •Using Scheduler Jobs
- •Using Scheduler Programs
- •Using Schedules
- •Creating Lightweight Jobs
- •Using Job Chains
- •Using Scheduler Windows
- •Creating and Using Job Classes
- •Using Advanced Scheduler Concepts to Prioritize Jobs
- •Using Scheduler Views
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •An Overview of Globalization Support
- •Using NLS Parameters
- •Using Datetime Datatypes
- •Using Linguistic Sorts and Searches
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Lab 1.1: Creating an ASM Instance
- •Lab 1.2: Creating ASM Disk Groups
- •Lab 1.3: Using ASM Disk Groups from a Database
- •Lab 2.2: Putting the Database in ARCHIVELOG Mode
- •Lab 2.3: Executing a Manual Online (Hot) Backup
- •Lab 3.1: Executing a Time-Based Point-in-Time Recovery
- •Lab 3.2: Recovering from Control-File Loss with a Backup Control File
- •Lab 3.3: Recovering from Loss of the Current Online Redo Log
- •Lab 4.1: Creating an RMAN Offline Backup
- •Lab 4.2: Creating an RMAN Incremental Backup
- •Lab 4.3: Creating an Image-Copy Backup
- •Lab 5.1: Implementing RVPC
- •Lab 6.1: Restoring a Datafile Online
- •Lab 6.2: Performing a Change-Based Recovery with RMAN
- •Lab 6.3: Restoring a Control File from an Autobackup
- •Lab 7.1: Monitoring RMAN Backups
- •Lab 7.2: One of My Backups Is Missing!
- •Lab 8.1: Duplicating a Database Using Active Database Duplication
- •Lab 8.2: Duplicating a Database Using Backup-Based Duplication to a Different Point in Time
- •Lab 9.1: Using the Recycle Bin
- •Lab 9.3: Using Flashback Data Archive
- •Lab 10.1: Using Support Workbench to Report a Problem to Oracle Support
- •Lab 11.1: Exporting a Transportable Tablespace
- •Lab 11.2: Testing Resumable Space Allocation
- •Lab 11.3: Manually Configuring the SGA
- •Lab 12.1: Creating a Local External Job
- •Lab 12.2: Creating a Job Window
- •Lab 13.1: Using the Locale Builder to Create a New Linguistic Sort
- •Lab 13.2: Setting NLS Parameters
- •Lab 13.3: Performing Linguistic Sorts
- •What You’ll Find on the CD
- •System Requirements
- •Using the CD
- •Troubleshooting
- •Glossary
- •Index
Answers to Review Questions |
227 |
Answers to Review Questions
1.B, C, E. The recovery catalog provides a means of storing metadata related to a database’s RMAN backup and recovery operations. Additionally, it provides the ability to store scripts that can be used by any database connecting to the repository via RMAN. Finally, the recovery catalog provides the means to store backup records for longer than a year.
2.A, C. The RECOVERY_CATALOG_OWNER and RESOURCE privileges are required to create the recovery catalog. The DBA privilege includes RESOURCE and CONNECT and will work, but this role has many additional privileges that are unneeded. SELECT ANY DICTIONARY is not required.
3.B. Use the create catalog command to create the recovery-catalog schema.
4.A, B. Anytime you execute an RMAN backup operation when connected to the recovery catalog, RMAN will automatically resynchronize the recovery-catalog metadata with the database control file. The resync command is used to manually resynchronize the recovery catalog with the database.
5.D. You would use the execute script RMAN command, contained within a run block, to execute the backup_database script.
6.C. You would first create the recovery catalog database. Then you create the recovery catalog user, granting that user the RECOVERY_CATALOG_OWNER role. You then issue the create catalog command from RMAN, which will create the recovery-catalog schema. Finally, you connect to the target database and register the database with the register database command.
7.D. To give the RVPC user rights to specific databases, you must connect to the recovery catalog with RMAN. You then grant those rights to that user from the RMAN prompt using the grant command.
8.A, C. The RVPC user can register database if they are granted the register database privilege. They can also see all recovery-catalog database metadata to which they are granted access.
9.D. The script will prompt for the missing substitution variable. The script will return an error if you do not put in a value for the second substitution variable.
10.C, D. Options C and D show the correct format for the RMAN command line. Option C connects to the database locally, while option D connects through Oracle Net. Both methods are completely legal.
Chapter
6
Recovering Databases with RMAN
Oracle Database 11g: Administration II exam objectives covered in this chapter:
ÛÛUsing RMAN to Perform Recovery
NNPerform complete recovery from a critical or non-critical data file loss using RMAN
Perform incomplete recovery using RMAN
Recover using incrementally updated backups
Switch to image copies for fast recovery
Recover using a backup control file
Database recovery ought to be easy in our minds. You have enough problems when your database has unexpectedly left the building, and those problems should not be made worse
by a bad piece of database-backup-and recovery software. RMAN makes recovery of your database easy as long as you have crafted a solid backup and recovery strategy (discussed in previous chapters). Additionally, the old adage that practice makes perfect very much applies to database recoveries. So take some time and practice a recovery or two before you have to deal with the real thing. All too often, people wait for disaster to strike rather than learning what to do beforehand.
This chapter is about what to do when disaster strikes and you are under the gun to get your backup restored. In this chapter, we will discuss the following topics:
NN |
RMAN database-recovery basics |
|
|
NN |
Recovering a database in NOARCHIVELOG mode |
NN |
Recovering a database in ARCHIVELOG mode |
NN |
Recovering datafiles or tablespaces in ARCHIVELOG mode |
|
|
NN |
Recovering a database using incomplete recovery |
NN |
Using image copies to recover your database |
NN |
Other recovery topics |
|
The best way to really learn about backup and recovery is to do it. A lot. The exercises in this chapter along with the examples of the various forms of recovery will certainly get you on your way.
Exam objectives are subject to change at any time without prior notice and at Oracle’s sole discretion. Please visit Oracle’s Training and Certification website (http://www.oracle.com/education/certification/) for the most current exam-objectives listing.
In this chapter and in Chapter 8 we have opted not to use a recovery catalog in our examples. The functionality demonstrated is the same with or without a recovery catalog. Where there are exceptions to this rule, we will note them or provide additional examples.