- •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
150 Chapter 3 n Performing Oracle User-Managed Database Recoveries
Answers to Review Questions
1.B. First you would take the users_01.dbf datafile offline. You would then restore the users_01.dbf datafile from the most current backup. Once you have restored the datafile, recover the datafile with the recover datafile command. Finally, bring the datafile online with the alter database command.
2.D. When you discover that you have lost an online redo log, and if the database is still up, the first action should be to checkpoint the database. This can serve to reduce the overall risk of data loss. After you checkpoint the database, you can then attempt to clear the online redo log. A backup afterward is highly recommended.
3.D. First you would restore the missing datafiles. Notice in the question that there are two datafiles that were lost. Next you would mount the database and then you would recover the SYSTEM tablespace. Since it is the SYSTEM tablespace, you would not be able to open the database first. Then you open the database with the alter database open command.
4.E. If you lose one or more control files but at least one remains, you should shut down the database. Then use any remaining control file as the source to create new control-file copies for the control files that were lost. Then restart the database. No recovery is required in this situation.
5.A, B, D. You will need the database datafiles, the control files, and the online redo logs all in place to be able to restore the database when it’s in NOARCHIVELOG mode.
6.C. If the database has not shut down yet, you have an opportunity to preserve your data changes. Issue a checkpoint, which will flush dirty buffers to disk. Then shut down the database normally, if possible (shutdown, shutdown immediate). You then should mount the database with the startup mount command followed by clearing and rebuilding the log file with the alter database clear logfile command. Finally, attempt to open the database with the alter database open command.
7.A, B, C, D. Change-based application allows you to recover the database to a specific SCN. Cancel-based recovery provides the ability for you to cancel recovery after each archived redo log application. Time-based recovery provides the ability to recover the database up to a specific point in time. Sequence number–based recovery allows you to recover the database up to a specific log sequence number.
8.A, C, D. To perform a full recovery of the database that is in ARCHIVELOG, you would need the database datafiles, the archived redo logs, and a backup control file.
9.E. You use the alter tablespace add tempfile command to re-create a missing tempfile or add a new tempfile to a temporary tablespace.
Answers to Review Questions |
151 |
10.C. You should first start the database in mount mode using the startup mount command. You then issue the alter database clear unarchived logfile command. This will clear the log file if it needs to be archived and re-create the online redo log group. If that command is successful, then you issue the alter database open command. The last step, backing up the database, is very important since your previous backup will not be able to recover the database beyond the point of the cleared redo log sequence number. This is because you have skipped a redo log in the redo log stream.
11. A. You would first take the missing datafile offline with the alter database datafile 4 offline command. You should then restore the datafiles that have been lost. Then issue the recover tablespace USERS command to recover the USERS tablespace. Use the alter database datafile 4 online command to bring the USERS tablespace online.
12.D. Since the online redo logs are intact, you will be able to use the noresetlogs version of the create controlfile command.
13.B. Since the database is in NOARCHIVELOG mode, their request cannot be met because point-in-time recovery is supported only in ARCHIVELOG mode.
14.A, C. You can create a backup control file with the alter database backup controlfile command. You can create a trace file that contains the create controlfile command.
15.A. First you would want to restore the three datafiles that were lost. Then you would want to issue the startup mount command to mount the database to prepare for recovery. You would then recover the database (you could opt to recover just the datafiles if you wished). Finally, open the database with the alter database open command.
16.E. In this situation, you have gotten yourself in real trouble and you will have data loss. First you will need to restore the last full database backup and also all archived redo logs that were generated during the backup and since the backup was completed. You will then issue the startup mount command to mount the database, and then issue the recover database until cancel command. Apply all the archived redo logs you can. Then cancel the recovery and open the database using the alter database open resetlogs command.
17.A. The SCN is a number that represents a point in time in the database relative to transactions within a given database.
18.A. If you have only lost a datafile, you should just restore and then recover the datafile.
19.A, C. This error will appear if an archived redo log is not available. In this case you need sequence 11. First you would try to restore archived redo log sequence 11. If log sequence 11 is not available as an archived redo log, you might find that it is available in one of the online redo logs.
20.A, E. The V$LOGFILE view will give you the name of the online redo logs associated with each group. The V$LOG view will provide the current sequence number assigned to each group.
Chapter
4
Configuring and
Backing Up Using
RMAN
Oracle Database 11g: Administration II exam objectives covered in this chapter:
ÛÛConfiguring Backup Specifications
NN Allocate channels to use in backing up
NN Configure backup optimization
ÛÛConfiguring for Recovery
NN Define, apply and use a retention policy
NN Configure the Flash Recovery Area
NN Use Flash Recovery Area
ÛÛUsing RMAN to Create Backups
NN Create image file backups
NN Create a whole database backup
NN Enable fast incremental backup
NN Create duplex backup and back up backup sets
NN Create an archival backup for long-term retention
NN Create a multi-section compressed and encrypted backup
