Oracle Rman Restore and Recovery Tutorial (iii) RESTORE command and Recover command

Source: Internet
Author: User
Tags backup

1. RESTORE command

Although the store command has some secondary targets, its main function is to restore files from the Rman backup to prepare for recovery. The Rman and restore commands are very limited, and they will select the most recent backup to restore, thereby reducing recovery time. As a result, the restore command might restore the data file from the backup set, or restore the data file from the image copy, or both and use it to restore, as long as it is helpful to speed up the restore process.

The restore command is used to restore server parameter files and control files from automatic backups. The Restore command can also be used to create an alternate control file for the backup database. You can also use the Restore command to restore the database to any point in time. In this case, the command looks for a backup that is closest to a given point in time for a restore. If there is no recovery directory, RMAN can restore the database to any point in time in the database counterpart (assuming backup is available). The restore command can also restore the database from the previous counterpart, but a backup control file is required to establish the counterpart. If you use the recovery directory, you can restore the database to any corresponding object.

The restore command can also restore a specific backup based on the given token that is assigned to the backup. This type of restore is useful if there is a "gold" backup that needs to be used frequently for restore in the development environment. If you need an archived redo log, the Restore command can also be used to restore the archived redo logs.

In addition, the Restore command can be used to validate the ability to actually recover data. This ensures that backups can be used to restore the database, and that the integrity of those backups can be verified. You can also use the Restore Preview command to identify the backups required to restore the database.

When you use the Restore command, if you are backing up encryption, you need to ensure that the encryption method is configured correctly. If you use transparent mode encryption, the corresponding electronic wallet must be available.

When you use the Restore command, the command overrides any files that already exist without a hint of awareness, unless you use the Set newname command. Because of this, you must be very careful when restoring files, and make sure that overwriting files that already exist does not have any adverse effects.

The restore command also has failback capabilities. During recovery, if Rman discovers that a given backup file is unavailable or has been compromised, he automatically attempts to use the previous backup to complete the repair process. When a failover occurs, Rman adds a corresponding message to the database alert log.

2, RECOVER command

The Recover command is used to restore the database. This command can perform a full or point-in-time recovery of the database. The Recover command determines which archived redo logs are required, as well as the extraction and application of them. Once the redo application has been completed, we simply need to open the database using the ALTER DATABASE Open command.

The Recover command is also used to determine whether an incremental backup image is available. These images can be applied to a basic incremental backup or a copy of the data file image. The recover command always tries to make incremental backups first, because this will be the quickest way to restore the database.

When restoring archived redo logs, the recover command attempts to use the redo logs that are already on the disk. If no redo logs are available on the disk, recover attempts to restore them from the various block redo log backup sets. Note that the Noredo parameter in the Recover command can be used to indicate that Rman should not attempt to apply the redo log to the database.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.