Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Backup concept (consistency, inconsistency)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Consistent backup (consistent backup) means that all changes in each file included in the backup have the same system change number (system change number,SCN).

That is, all the data in each file included in the backup comes from the same point in time. Different from inconsistent backup (inconsistent backup)

After you restore (restore) using a consistent database full backup (consistent whole database backup), you do not need to perform a restore operation (recovery).

An inconsistent backup is a backup of one or more database files when the database is open (open) or after an abnormal database shutdown (shut down abnormally).

1 Overview of consistent backup

After a consistent backup (consistent backup) of the whole or part of the database, all data files (datafile) and control files (control file) in the backup

All experienced the same checkpoint (checkpoint) and had the same SCN.

The only way to perform a consistent database full backup (consistent whole database backup) is to first shut down the database using the NORMAL,IMMEDIATE or TRANSACTIONAL option

And make a backup when the database is closed

Through the database checkpoint operation, Oracle makes the data file and the control file have the same SCN, that is, consistency. In a consistent backup, only read-only tablespaces (read-only tablespace) and

The SCN of offline tablespaces (offline tablespace) can lag behind the SCN of other files in the backup. The data in these two tablespaces will not be modified, so they can also meet the requirements of consistency.

An important feature of a full backup of a consistent database is that a database using this backup recovery (restore) can be opened (open) without a recovery.

This is because the recovered database is consistent: the data in the restored data file is correct and does not require any processing by the user. Users can restore the database using a consistent backup from a year ago

There is no need for media recovery (media recovery) and Oracle does not have to perform instance recovery (instance recovery).

However, if you restore the database with a consistent backup without applying the redo log (applying redo), all transactions generated after the backup will be lost.

2 inconsistent backup

If the database is not completely shut down, such as an instance failure, or the user uses a SHUTDOWN ABORT statement, the data file of the database is inconsistent, that is, the control file and the redo log

The three owners of dbf have different scn, unless this database is read-only.

If the database is running in NOARCHIVELOG (non-archived) mode, a consistent database full backup is the only valid backup scenario because a restore operation is required to ensure data consistency after restoring the database using an inconsistent backup (inconsistenbackup). In NOARCHIVELOG mode, Oracle does not archive redo logs, so the redo logs required for recovery may no longer exist. On the other hand, the database running in ARCHIVELOG (archive) mode can be backed up completely by consistent database. When using this backup to recover the database, the user can immediately open the database and lose all the transactions that occurred after the backup; if the archived redo logs exist, the user can also apply these logs to recover the transactions that occurred after the backup.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report