- •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
Summary 199
Or you can choose to define the location of the output control file, as shown in this example:
RMAN>backup as copy current controlfile format ’c:\oracle\controlfilebackup\contrf_backup.ctl’;
The backup controlfilecopy command will back up a control-file copy (created with the alter database backup controlfile to command or the backup as copy current controlfile command). Here is an example of the use of the backup controlfilecopy command:
SQL>Alter database backup controlfile to ’c:\oracle\controlfilebackup\contrf_backup.ctl’;
RMAN>backup controlfilecopy ’c:\oracle\controlfilebackup\contrf_backup.ctl’;
You can also back up spfiles with RMAN using the backup spfile command, as shown in this example:
RMAN>Backup spfile;
Backing Up RMAN Backup Sets
Often database backups will be initially made to disk, and then later those backups will be backed up to tape. The reason for this is that backing up to disk is generally much faster than backing up to tape. Yet you want to back up to tape so you can offsite the media
and because tape tends to be less expensive for longer-term storage (though this is quickly becoming less true).
To back up a backup set, you use the backup backupset command, as shown here:
RMAN> backup device type sbt backupset all;
Summary
In this chapter, we introduced you to RMAN, Oracle’s backup and recovery tool of choice. We discussed the many features that make RMAN truly a power backup and recovery tool. We discussed the architecture of RMAN, including backup set pieces, which are the critical component of any RMAN backup.
We then talked about how to configure RMAN so that it is easy to use. Persistent configuration parameters are the key to RMAN’s ease of use, and understanding what they are and what they do is key to understanding how RMAN works. There is a number of different configuration options to consider, including parallelism, compression, and encryption, and the OCP exam is poised to ask you about all of them.
200 Chapter 4 n Configuring and Backing Up Using RMAN
Finally, we talked about actually backing up your database with RMAN. We talked about the various kinds of backups available to you, from complete database backups to incremental backups. We covered backing up tablespaces and datafiles and backing up archived redo logs. We even talked about backing up the backups themselves if we were not already talking you into circles enough.
In the following chapters, we will be covering the RMAN recovery catalog, recovering your database with RMAN, reporting from RMAN, and finally, advanced RMAN recovery topics. So there is plenty of fun yet to go. Hang tight—it’s going to be a fun ride!
Exam Essentials
Be able to describe the basic RMAN architecture. Understand what backup sets and backup set pieces are. Understand that backup set pieces are physical files that contain the data that has actually been backed up. Understand what the flash recovery area is, what its benefits are, and what parameters are required to configure it.
Be able to configure RMAN. Understand what the RMAN configure command does and how to use it. Understand how to use the show command to display persistent configuration settings. Understand the use of the different persistent configuration settings, such as compression, encryption, and devices. Know the difference between a disk device and the SBT device (tape). Explain how RMAN retention policies work and how to configure them. Explain what backup optimization is and how it works. Understand how to configure for duplexed backups.
Know how to back up your database with RMAN. Understand the different kinds of backups available in RMAN. Know what a whole database backup is and how to perform it both with configured settings and using a run block. Know how to use the keep command to override retention policies. Know what an incremental database backup is and how to perform it. Understand the different kinds of incremental database backups and how to create a blockchange tracking file. Know what multiselection backups are and how to create them. Know what image copies are and how to create them. Know how to back up archived redo logs, control files, and spfiles. Know how to back up backup sets.
Review Questions |
201 |
Review Questions
1.How is block-change tracking enabled?
A. |
With alter |
database enable block change tracking |
B. |
With alter |
system enable block change tracking |
C.With an init.ora parameter change
D.With an spfile parameter change
2.What type of backup is stored in a proprietary RMAN format?
A.Backup set
B.Image copy
C.Backup section
D.Backup group
3.Consider the following command:
Backup database plus archivelog delete input;
How many backup sets would be created by this command if the following were true:
NNControl-file auto backups were enabled.
NN |
The size of backup sets was not restricted. |
NN |
One channel was allocated. |
A.1
B.2
C.3
D.4
E.5
4.Which command creates an image copy?
A.backup as copy
B.backup copy
C.copy as backup
D.copy back
202 Chapter 4 n Configuring and Backing Up Using RMAN
5.Compressed backups work with which of the following commands?
A.copy as backup
B.backup as copy
C.backup
D.copy
6.Which is the correct command to back up the database, back up the archived redo logs, and then remove the backed-up archived redo logs?
A.backup database
B.backup database and archivelogs
C.backup database plus archivelogs
D backup database plus archivelog delete input
E.backup database and archivelog delete input
7.Which of the following best describes a full backup?
A.All datafiles of a database
B.All datafiles, archive logs, and control files
C.All datafiles and control files
D.All the used blocks in a datafile
8.Which type of backup backs up only data blocks modified since the most recent backup at the same level or lower?
A.Differential incremental backup
B.Different incremental backup
C.Cumulative backup
D.Cumulative incremental backup
9.Which type of backup must be performed first with an incremental backup?
A.Level 1
B.Level 0
C.Level 2
D.Level 3
10.Which backup option defines a user-defined name for a backup?
A.FORMAT
B.NAME
C.TAG
D.FORMAT U%
Review Questions |
203 |
11.Given the following steps, which would be the correct order to create a backup of an Oracle database in NOARCHIVELOG mode?
a.shutdown immediate from RMAN
b.Log into RMAN
c.startup mount from RMAN
d.backup database
e.alter database open
f.backup database plus archivelog delete input
A.b, c ,a, d, e
B.b, a, c, f, e
C.a, c, e, d
D.b, a, c, e, f
E.b, a, c, d, e
12.Which of the following most closely represents an image copy?
A.Unix cp command of a file
B.Bit-by-bit copy of a file
C.Windows COPY command of a file
D.All of the above
13.Which dynamic view displays the status of block-change tracking?
A.V$BLOCK_CHANGE
B.V$BLOCK_CHANGE_TRACKING
C.V$BLOCKCHANGE
D.V$BLOCK_TRACKING
14.What feature comes into play to help ensure the completion of the backup should one of three backup devices fail during a backup that is using three different channels?
A.Channel failover
B.Restartable backups
C.Rescheduable backups
D.Automatic backup recovery
E.Channel recovery
15.What command would you use to set a persistent setting in RMAN so that backups are all written to a tape device?
A.CONFIGURE DEFAULT DEVICE TYPE TO TAPE MEDIA
B.CONFIGURE DEFAULT DEVICE TYPE TO TAPE
C.CONFIGURE DEFAULT DEVICE TYPE TO SBT
D.CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE
204 Chapter 4 n Configuring and Backing Up Using RMAN
16.The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter should be set to what value? (Choose all that apply.)
A.The initialization parameter should be set to 0 when the RMAN repository is being used.
B.The initialization parameter should be set to greater than 0 with the RMAN repository utilizing the recovery catalog only.
C.The initialization parameter should be set to greater than 0 with the RMAN repository utilizing the control file or the recovery catalog.
D.The initialization parameter should be set to 0 with the RMAN repository utilizing the control file or the recovery catalog.
E.The initialization parameter should never be set to 0 if you are using RMAN.
17.Given the following steps, which would be the correct order to create a backup of an Oracle database in ARCHIVELOG mode with control-file autobackups enabled?
a.backup archivelog all;
b.backup database all;
c.backup controlfile;
d.backup archivelog, database, controlfile delete input;
e.backup database plus archivelog delete input
A.e
B.a, b, a, c
C.d
D.b, a, c
E.b, a, c, d, e
18.Which of the following statements are true about the BACKUP command? (Choose all that apply.)
A.The BACKUP command can not be used to make image copies of a datafile.
B.The BACKUP command can improve performance by multiplexing backup files.
C.The BACKUP can take advantage of the block-change tracking capability.
D.The BACKUP command cannot store data in incremental backups.
E.The BACKUP command can store data in cumulative incremental backups only.
19.Which command is used to configure RMAN to perform a compressed backup for every backup executed?
A.BACKUP AS COMPRESSED BACKUPSET DATABASE
B.BACKUP AS COMPRESSED COPY OF DATABASE
C.CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET
D.CONFIGURE DEVICE TYPE DISK BACKUP TYPE COMPRESS
E.BACKUP DATABASE COMPRESS
Review Questions |
205 |
20.You issue the following command:
RMAN>CONFIGURE BACKUP OPTIMIZATION ON;
What is the result of this command on your backups?
A.An incremental backup strategy will be used automatically.
B.Read-only datafiles will not be backed up as long as backups of those files already exist and those backups meet established retention criteria.
C.RMAN will configure itself for maximum performance at the cost of CPU.
D.RMAN will configure itself for minimal OS/CPU impact at the cost of time to back up the database.
E.RMAN will automatically compress backups.