【翻】What Is Undo? 2017-11-28
What Is Undo?? 什么是Undo?
Oracle Database creates and manages information that is used to roll back, or undo, changes to the database. Such information consists of records of the actions of transactions, primarily before they are committed. These records are collectively referred to as undo.
Undo 是 Oracle數據庫創建和管理用于回滾或撤銷數據庫更改的信息。這些信息由沒有被committed的事務性操作的記錄組成。這些記錄被統稱為undo
Undo records are used to:
Undo記錄用于:
-
Roll back transactions when a ROLLBACK statement is issued
在發出回滾語句時回滾事務 -
Recover the database
恢復數據庫 -
Provide read consistency
保證讀操作的一致性 -
Analyze data as of an earlier point in time by using Oracle Flashback Query
通過使用Oracle Flashback Query來分析早期的數據 -
Recover from logical corruptions using Oracle Flashback features
使用Oracle Flashback特性從邏輯壞塊中恢復數據
When a ROLLBACK statement is issued, undo records are used to undo changes that were made to the database by the uncommitted transaction. During database recovery, undo records are used to undo any uncommitted changes applied from the redo log to the data files. Undo records provide read consistency by maintaining the before image of the data for users who are accessing the data at the same time that another user is changing it.
當發出一個ROLLBACK 語句,undo記錄用于撤銷那些沒有被committed的事務做出的修改。
在數據庫恢復期間,undo記錄用于撤消從redo日志到數據文件所產生的任何沒有committed的更改。
Undo記錄提供了讀取的一致性,具體做法是保存在另一個用戶正在更改數據的同時訪問數據的用戶的數據之前的數據快照。 ????????最后一句話太晦澀,解釋一下:
????????有三個時刻ABC
????????甲在A時刻對一塊數據發起訪問,在C時刻獲取到數據
????????乙在中間時刻B,對同一塊數據進行了修改,
????????該如何保證甲在A時刻和C時刻讀取到一致的數據?
????????undo記錄在甲發起訪問時,對該數據保留了一份快照,不管A到C中這塊數據經歷了怎樣的變化,甲訪問到的永遠是A時刻的數據快照。
來自 “ ITPUB博客 ” ,鏈接:http://blog.itpub.net/31470016/viewspace-2147889/,如需轉載,請注明出處,否則將追究法律責任。
轉載于:http://blog.itpub.net/31470016/viewspace-2147889/
總結
以上是生活随笔為你收集整理的【翻】What Is Undo? 2017-11-28的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 选择性拷贝
- 下一篇: DirectX的历史与版本