Scheduling Other Backup Tasks
Scheduling Other Backup Tasks
After taking some time to understand the full range of available backup options as described in Oracle Database Backup and Recovery Basics, you may decide to schedule backup tasks beyond those used to implement the Oracle-suggested backup strategy.
While the particulars of specifying the job to perform differ for each type of backup, all backups begin from the Schedule Backup page shown in Figure 9–1 . Here you can select any of several object types to back up. You can also back up existing backups in one destination to some other destination, such as moving backups from disk to tape.
Click Schedule Customized Backup to continue to the pages where you specify details such as objects to back up, required options and settings. The choices presented on these pages are determined by the type of objects being backed up. On each page, after you have made your selections, click Next to proceed to the next page.
After you have specified the options, you reach the Schedule Customized Backup: Schedule page, where you specify the times at which the job is to be performed, as well as the Job Name and Job Description.
When you are done with the job name, description and schedule, click Next to move on to the Schedule Customized Backup: Review page. After reviewing the options, either click Back to make changes, click Edit RMAN Script to make changes to the script, or click Submit Job to add the job to the schedule.
Validating Backups and Testing Your Backup Strategy
As part of your backup strategy, you should periodically check whether your backups are intact and can be used to meet your recoverability objectives.
Through Enterprise Manager, there are two different ways to validate your backups:
9-16 Oracle Database 2 Day DBA
You can select specific backup sets or image copies in Enterprise Manager and request that they be validated. This form of validation can reveal that a particular backup on disk or tape has been lost or corrupted.
You can specify database files to restore, and let RMAN select backups to use in restoring those files, as it would for a real database restore operation. This form of backup validation ensures that your available backups are sufficient to restore your database. For example, this operation can reveal that your backup strategy does not back up all of your tablespaces, or that the loss of a particular backup prevents you from restoring a certain tablespace.
Note: Validating backups stored on tape can be time-consuming because the entire backup is actually read from tape.
Validating that you can perform specific restore operations with your available backups is performed through the Perform Recovery pages, and is described in "Validating the Restore of Datafiles from RMAN Backup" on page 9-20. Validating specific backup sets and image copies on disk or tape is performed through the Manage Current Backups pages, and is described in "Validating the Contents of Backup Sets or Image Copies" on page 9-28. Both forms of validation can be set up as scheduled tasks in Enterprise Manager. You should incorporate both forms of validation into your backup strategy to ensure that your recoverability goals are always met by your available backups.
Performing Restore and Recovery Operations
Enterprise Manager's Guided Recovery capability provides a Recovery wizard that encapsulates the logic required for a wide range of restore and recovery scenarios, including the following:
Complete restore and recovery of the database
Point-in-time recovery of the database or selected tablespaces
Flashback Database
Other flashback features of Oracle for logical-level repair of unwanted changes to database objects
Block media recovery of datafiles with corrupt blocks Enterprise Manager can determine which parts of the database must be restored and
recovered, including proactively detecting situations such as corrupted database files. Enterprise Managers walks you through the recovery process, prompting for any needed information and performing needed recovery actions.
The examples in this section only illustrate a few common restore and recovery tasks. Nevertheless, the same Perform Recovery page is used to access the other whole database or object-level recovery features of Enterprise Manager.
To access the restore and recovery tasks:
1. In the Database home page, click Maintenance. The Maintenance property page appears.
2. In the Backup/Recovery section of the Maintenance page, click Perform Recovery. The Perform Recovery page appears. A section of this page is shown in Figure 9–2 .
Performing Backup and Recovery 9-17
Figure 9–2 Perform Recovery Page
On the Perform Recovery page, you can recover your whole database or only selected tablespaces, datafiles, archived logs, or tables.
Note: In some recovery scenarios, such as a complete restore and recovery of your database, the database state will be altered by steps you take during the wizard. Changes, some of them irreversible, are made to your database at certain steps. For example, the database may be shut down and brought to MOUNTED state, or datafiles may be overwritten with versions from backup.
Oracle Enterprise Manager will display warnings each time a significant database change will result from pressing Continue during the recovery process. Pay close attention to these warnings.
Recovering a Whole Database from Backup
This example demonstrates recovery of the whole database from backup. The example assumes that you are restoring and recovering your database after the loss of one or more datafiles, but still have a usable SPFILE and control file. Enterprise Manager can also be used to restore a lost SPFILE or control file. See "Recovering from a Lost SPFILE or Control File" on page 9-20 for details.
1. In the Backup/Recovery section of the Maintenance page, click Perform Recovery. The Perform Recovery page appears.
9-18 Oracle Database 2 Day DBA
2. Select Recover to the current time or a previous point-in-time and click Perform Whole Database Recovery . Also, provide the requested host credentials at this time if necessary. Click Continue.
The Confirmation page appears.
3. Click Yes to confirm the shutdown of the database. The Recovery Wizard page appears. At this point, Oracle shuts down your
database. Note: When the database is shut down and brought to the MOUNTED
state, Enterprise Manager is also shut down briefly and restarted. During this process, there is a period during which Enterprise Manager cannot respond to your browser, or may respond with an error. Refresh the page until Enterprise Manager responds again.
When Enterprise Manager has restarted and the database is being started and brought to the MOUNTED state, Enterprise Manager may also briefly report that the database is reported to be in NOMOUNT state. You are offered the choices Refresh, Startup, and Perform Recovery. Refresh the page periodically until the Database Instance page reports that the database instance is mounted before proceeding.
4. Click Perform Recovery to resume your recovery session. You may be prompted for host and database credentials. Connect with SYSDBA role, or provide host credentials for a user in the DBA group.
When the Perform Recovery page is displayed again, it shows that the database is in a MOUNTED state (as is required for this operation).
5. At this point, as you did before, under Whole Database Recovery, select Recover to the current time or a previous point-in-time and click Perform Whole Database Recovery .
The Perform Whole Database Recovery: Point-in-time page appears.
6. Specify whether to recover all transactions to your database as of the present time (which is called complete recovery), or only transactions up through some point in time in the past (which is called point-in-time recovery).
Note: Point-in-time recovery is a recovery technique that lets you return the database to its state before some unwanted major change. For more details about point-in-time recovery, see Oracle Database Backup and Recovery Basics.
For this example, select Recover to the current time and then click Next. The Perform Whole Database Recovery: Rename page appears.
7. You can specify a new directory or new filename for the restored files. For this example, select No to restore the files to the default location, which is its location before the restore operation. Click Next to continue.
The Perform Whole Database Recovery: Review page appears.
8. Review the options you chose. You can click Edit RMAN script to display the RMAN script that will be run to carry out your requested restore and recovery action. Click Submit to start the recovery.
Performing Backup and Recovery 9-19