RMAN backup and recovery-full recovery and Incomplete recovery

Source: Internet
Author: User

RMAN backup and recovery-full recovery and Incomplete recovery
Glossary:

As the name suggests, full recovery means that the index data has not been lost. Incomplete recovery refers to the loss of some data after recovery. They are two recovery methods for databases.

Full recovery: Use the redo log or Incremental backup to restore the data block to a time point closest to the current time. Full recovery is called because all the modifications to archive logs and online redo logs are applied in Oracle. Incomplete recovery: the backup is used to generate a database of a non-current version. In other words, no redo logs generated after the backup are applied during the restoration process. Generally, Incomplete recovery of the entire database is generated in the following circumstances. ● media failure damages several or all online redo log files. ● data loss caused by user operations, for example, the user accidentally deleted a table. ● the loss of some archived log files cannot be completely restored. ● if the current control file is lost, the backup control file must be used to open the database. To restore incomplete media, you must use a backup before the recovery time point to restore the data file, and use the RESETLOG option to open the database after the recovery is complete. During incomplete recovery of the resetlogs parameter, you usually need to use the resetlogs command to open the database because we need to remove it from the existing redo log stream. The resetlogs parameter indicates that the logical lifetime of a database ends the beginning of the logical lifetime of another database. The logical lifetime of a database is also called an incarnation ). Each time you use the resetlogs command, the SCN counter is not reset, But Oracle resets other counters (such as log serial numbers) and online redo logs. After testing, when you try to perform full recovery in non-archive mode, the following error is reported in RMAN after the alter database open command is issued: SQL> alter database open; alter database open * ERROR at line 1: ORA-01589: must use RESETLOGS or NORESETLOGS option for database open but if resetlogs is added, no ERROR is reported. In addition, from the recovery process, the online log document is used during the period, that is, it executes full recovery. This indicates that the redo log must be reset when the database is opened after full recovery is performed in non-archive mode. In fact, this is also very good. In non-archive mode, there is no archived duplicate logs. After online logs are used for full recovery, these online log files will be useless, therefore, Oracle resets the log file serial number (in my opinion, theoretically, it can be left blank. The serial number of the log file is directly added to the existing Log serial number, however, the log serial number will increase. Oracle should have reset the redo log when performing full recovery and Incomplete recovery in non-archive mode ). It is very easy to completely recover from full recovery, not to mention, as follows: $ rman target/# log on to the rman tool. If catalog is used, then, the logon method rman targetsys/Oracle @ lscatalogcata/cata @ leo RMAN> startup mount # Must be in the mount status before restore and recover database RMAN> restore database; # copy the old data file to overwrite the corrupted data file RMAN> recover database; # synchronize the last SCN number in the current log with the data file header SCN number [full recovery] RMAN> alter database open [resetlogs]. Incomplete recovery or incomplete recovery has a core requirement to keep in mind: incomplete recovery affects the entire database. You cannot perform Incomplete recovery on only part of the database. Incomplete recovery usually involves Restoration Based on Time, SCN, log sequence, restore origin, or deletion. $ Rman target/RMAN> startup mount RMAN> run 2> {
3> set until time "to_date ('2014/1/2 15:00:00 ', 'Mm/dd/yyyy hh24: mi: ss ')";
4> restore database;
5> recover database;
6> alter database open;
7>} from the execution process, Incomplete recovery adds a restriction, such as the time/SCN. Oracle searches for the backup set that was last established with the recovery time. If no backup set is available, an error is returned.

-------------------------------------- Recommended reading --------------------------------------

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

-------------------------------------- Split line --------------------------------------

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.