- •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
346 Chapter 8 n Performing Oracle Advanced Recovery
Answers to Review Questions
1.B. Tablespace point-in-time recovery has been done in Oracle for some time, using various means and methods. RMAN simply automates and simplifies the process for you.
2.B. The recover tablespace command is used to start a TSPITR recovery.
3.B. Active database duplication does not require any backup before the duplication is run.
4.E. The commands in option E are the correct commands to perform an active database duplication given the conditions listed.
5.B. You will use two databases. The first is be the target database, and the second is the auxiliary database instance.
6.C. The reset database to incarnation command is used to reset the database incarnation.
7.C. The TS_PITR_CHECK view is used to determine if a given tablespace (or tablespaces) can be independently transported or if there are other dependencies that will require the transport of additional tablespaces.
8.E. You would first need to restore the RMAN backup set pieces. Then you would restore the database spfile followed by the database control file. You would then run the RMAN restore and recover command. Finally, you would open the database with the alter database open resetlogs command.
9.A. The correct answer is log_file_name_convert. This setting will direct RMAN to the directory in which it should create the online redo logs.
10.E. The correct command is shown in option E. You would issue the recover tablespace command and list the tablespaces to be recovered. You would then use the until time parameter to define the point in time to restore the tablespace to. Finally, you would define the location for the auxiliary database instance with the auxiliary destination parameter.
11.B. Any database to be duplicated in active mode must be in ARCHIVELOG mode.
12.B. This error message alludes to the fact that there is not a backup of the database available to perform TSPITR. A backup before the point in time of the recovery is required to perform TSPITR.
13.A, B. The database must be in ARCHIVELOG mode to perform a TSPITR. Additionally, you must have a backup of the database that occurred at a point in time before the point in time to which you want to perform the TSPITR.
14.C. Use the TS_PITR_OBJECTS_TO_BE_DROPPED view to determine which objects will be lost as a result of the pending tablespace point-in-time recovery operation. To preserve the
objects, you will want to export them before the TSPITR and import them after the recovery is complete with the Oracle Data Pump or Imp/Exp utility.
Answers to Review Questions |
347 |
15.B. If there is a constraint between two objects in two different tablespaces, you must perform a TSPITR between the two tablespaces. As an alternative, you could disable or drop the constraint. You may not be able to reenable the constraint with validation after the TSPITR, however.
16.D. The DB_FILE_NAME_CONVERT parameter is used to define the location in which the datafiles for the auxiliary-database datafiles should be created.
17.D. The second recover tablespace command will fail because it is trying to perform a recovery to a point in time before the time to which the tablespace was recovered during the first recovery.
18.B. After you perform a TSPITR, you should back up the tablespace/datafile. If you do not, you will not be able to do a TSPITR to any point in time before the original TSPITR.
19.B. After a TSPITR each datafile associated with the TSPITR will be offline. Oracle recommends you back up the datafile before bringing it online.
20.A. The list incarnation of database command is used to produce a report of database incarnations.
Chapter
9
Understanding
Flashback Technology
Oracle Database 11g: Administration II exam objectives covered in this chapter:
ÛÛUsing Flashback Technology
NN Restore dropped tables from the Recycle Bin
NN Perform Flashback Query
NN Use Flashback Transaction Query
ÛÛAdditional Flashback Operations
NN Perform Flashback Table Operations
NNConfigure, Monitor Flashback Database and perform Flashback Database operations
NN Set up and use a Flashback Data Archive
If you have been working through this book chapter by chapter, you should have a pretty firm grasp of Oracle backup and recovery methods available through RMAN. For the most part,
RMAN works in the physical realm. It provides recovery from physical problems such as physical block corruption, failed hardware, missing files, and so on. It is vital for a database administrator to be able to recover from these types of problems, and RMAN is definitely the tool for the job.
But database administrators must also have tools to deal with logical corruption in the database. Logical corruption, for the most part, is synonymous with the term user error. Rather than having a physical problem with your database, you have a problem with the data in your database. Here are some examples:
NN |
A developer accidentally drops a table. |
|
|
NN |
A programming bug causes data updates to populate the wrong records. |
NN |
The DBA is purging data and accidentally deletes the wrong rows. |
NN |
An inadvertent table TRUNCATE takes place. |
|
|
|
Logical corruption is far more common than physical corruption. And although RMAN |
could certainly be used to recover from logical corruption, a full-blown recovery effort is time-consuming and generally involves database downtime.
In these situations, Flashback technology provides the solution. It allows dropped objects to be recovered. It allows queries to view data as it existed at a point in time in the past, and it allows queries to view a history of changes made to data. It even allows returning the entire database to a point in time or SCN. Having a thorough understanding of the many Flashback options will not only help you pass your OCP exam; it will help you to be a better DBA.
This chapter offers a detailed explanation of the functionality provided by Flashback technology as it exists in Oracle Database 11g (Oracle 11g).
Initially, we will provide a brief overview of Flashback functionality and where it fits in the database administrator’s arsenal. We will also examine Automatic Undo Management, the cornerstone upon which key Flashback technologies rely. Next, we will examine the various Flashback options:
NN |
Flashback Drop (and the Recycle Bin) |
NN |
Flashback Query |
NN |
Flashback Versions Query |
|
|
NN |
Flashback Transaction |
NN |
Flashback Table |