Rman Backup restores-full and incomplete recovery

Source: Internet
Author: User

noun Explanation:

As the name implies, full recovery means the recovery of data without loss. Incomplete recovery refers to some data loss after recovery. They are two ways to recover a database.

Full recovery: Restores a block of data to a point in time closest to the current time, using a redo log or an incremental backup. This is called full recovery becauseOracle applies all of the changes in the archive log and online redo logs。 Incomplete recovery: Use a backup to produce a database that is not in the current version. Other wordsall redo logs generated after the backup generation are not applied during the recovery process。 The failure to generate incomplete recovery media for the entire database usually fails to damage several or all of the online redo log files, data loss caused by user actions, for example, a user mistakenly deletes a table, and the loss of individual archived log files cannot be fully recovered;     The current control file, you must open the database using the backed up control file. In order to perform incomplete media recovery, the data file must be restored using a previous backup of the recovery point, and the database will be opened with the Resetlog option after the recovery is complete. resetlogs ParametersDuring an incomplete recovery, it is usually necessary to open the database with the Resetlogs command, because we are going to detach from the existing redo log stream already established.The resetlogs parameter represents the end of the logical lifetime of a database the beginning of another database logical lifetime。 The logical lifetime of a database is also known as a counterpart (incarnation).      The SCN counter is not reset each time the Resetlogs command is used, but Oracle resets the other counters (such as the log sequence number) and resets the contents of the online redo log.     After testing, when you try to perform a full recovery in non-archive mode, when you issue the ALTER DATABASE open, Rman reports the following error: sql> ALTER DATABASE open; ALTER DATABASE open * ERROR at line 1:ora-01589:must with resetlogs or noresetlogs option for database open but If you add resetlogs, you will not get an error. And from the recovery process, the period is really used in the online log document, which means that it performs a full recovery. This means that after a full recovery is performed in non-archive mode, the redo log is also reset when the database is opened. In fact, this is also very good to think, non-archive mode, no archived redo log, full recovery when using online logs, these online log files are not useful, so Oracle resets the log file sequence number (personally think: Theoretically, can not be reset, The sequence number of the log file is incremented directly on the existing log sequence number, but the log sequence number will become larger. Oracle should consider this to reset the redo log when performing full and incomplete recoveries in non-archive mode. Full RecoveryFull recovery is simple, not much to say, as follows: $ rman target/# #登录rman工具, if catalog is used, the login method Rman Targetsys/[email protected]/[e     Mail protected] rman> startup Mount # #必须为mount状态 to restore and recover databases rman> restore database; # #复制旧数据文件覆盖损坏的数据文件 rman> recover database; # #数据文件头SCN号同步当前日志中最后一个SCN号 "Full recovery" rman> ALTER DATABASE Open [Resetlogs]; not fully recoveredIncomplete recovery has a core essentials to keep in mind:Incomplete recovery affects the entire database and cannot perform incomplete restores only to part of the database。      The methods used for incomplete recovery are usually: time-based, SCN, log sequence, restore point, or delete-based recovery. $ Rman target/rman> Startup Mount Rman>run 2> {
3> set until Time "to_date (' 07/01/2015 15:00:00 ', ' mm/dd/yyyy hh24:mi:ss ')";
4> Restore Database;
5> Recover database;
6> ALTER DATABASE open;
7>} from the execution of the process, the incomplete recovery is to add a restriction, time/SCN and so on. As on point-in-time recovery, Oracle looks for the backup set that precedes the target recovery time and is closest to the recovery time. If no available backup set is found, an error will be taken.

Rman Backup restores-full and incomplete recovery

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.