Oracle Concepts
Purpose of Instance Recovery 实例恢复的目的 Instance recovery ensures that the database is in a consistent state after an instance failure. The files of a database can be left in an inconsistent state because of how Oracle Database manages
Purpose of Instance Recovery
实例恢复的目的
Instance recovery ensures that the database is in a consistent state after an instance failure. The files of a database can be left in an inconsistent state because of how Oracle Database manages database changes.
实例恢复可确保数据库在一个实例失败后仍能回到一个一致的状态。由于Oracle 数据库对数据文件更改的管理方式所致,数据库的文件可以处于不一致的状态。
A redo thread is a record of all of the changes generated by an instance. A single-instance database has one thread of redo, whereas an Oracle RAC database has multiple redo threads, one for each database instance.
重做线程是对实例生成的所有更改的记录。单实例数据库拥有一个重做线程,而一个 Oracle RAC 数据库拥有多个重做线程——每个数据库实例有一个。
When a transaction is committed, log writer (LGWR) writes both the remaining redo entries in memory and the transaction SCN to the online redo log. However, the database writer (DBW) process writes modified data blocks to the data files whenever it is most efficient. For this reason, uncommitted changes may temporarily exist in the data files while committed changes do not yet exist in the data files.
当事务提交时,日志写入器 (LGWR) 将内存中的重做条目和事务 SCN 同时写入联机重做日志。但是,数据库写入器 (DBWn) 进程只在最有利的时机将已修改的数据块写入数据文件。由于这个原因,未提交的更改可能会暂时存在于数据文件中,而已提交的更改也可能还不在数据文件中。
If an instance of an open database fails, either because of a SHUTDOWN ABORT
statement or abnormal termination, then the following situations can result:
如果某个打开的数据库的实例失败,或者由于 SHUTDOWN ABORT 语句或异常终止,则可能会导致下列情况:
-
Data blocks committed by a transaction are not written to the data files and appear only in the online redo log. These changes must be reapplied to the database.
由某事务已提交的数据块更新还未写入数据文件,而仅写入了联机重做日志中。这些更改必须重新应用到数据库。
-
The data files contains changes that had not been committed when the instance failed. These changes must be rolled back to ensure transactional consistency.
数据文件包含实例失败时尚未提交的更改。这些更改必须回滚,以确保事务一致性。
Instance recovery uses only online redo log files and current online data files to synchronize the data files and ensure that they are consistent.
实例恢复只使用联机重做日志文件和当前在线的数据文件,以同步数据文件,并确保它们一致。
See Also:
-
"Database Writer Process (DBWn)" and "Database Buffer Cache"
-
"Introduction to Data Concurrency and Consistency"