資料庫崩潰後對redo log的使用

2021-07-03 08:13:52 字數 532 閱讀 3282

使用者對資料庫做的任何操作均會產生redo log,事實上是先把redo log寫到redo log cache中,再把實際資料更改寫至buffer cache中。

redo log會在以下情況從redo log cache寫至online redo log file中:

l 每隔3秒鐘

l redo log cache使用了1/3

l 當資料庫定寫入器通知重做記錄需要寫入磁碟時。即在資料寫入資料檔案前。

但若此時資料庫發生崩潰,而部分資料未寫至data file中,則:

(1)對於未提交事務,執行撤銷操作。(是否有可能未commit,但資料已經寫入data file。若yes,則有可能buffer cache滿了,下次讀取資料從data file讀取,導致未commit更改生效了。因此不可能yes。但若no,則有部分未提交資料一直佔據buffer cache,若滿了怎麼辦?)

(2)對於已提交事務,但資料未寫至data file的,根據redo log執行重做。

也就是說一切操作均產生redo log,不管是否commit。

系統崩潰後恢復Oracle 9i資料庫

使用者的系統崩潰,這次的環境是oracle 9i,作業系統是windows2003。資料庫的資料都存在,需要恢復。具體做法和恢復10g有些類似 1.將以前的目錄改名,重新按照以前的結構安裝資料庫軟體。2.將以前資料檔案中的 d oracle oradata 和d oracle admin 檔案拷貝到...

作業系統崩潰後,恢復ORACLE 9資料庫

作業系統崩潰後,恢復oracle 9資料庫 參照文章http blog.csdn.net whqcfp archive 2006 11 23 1408229.aspx 並感謝one dollar提供這個文章 oracle 資料庫安裝在d盤遺留下資料檔案 檔案分布結構如下 d oracle orada...

作業系統崩潰後,恢復ORACLE 9資料庫

oracle 資料庫安裝在d盤遺留下資料檔案 檔案分布結構如下 d oracle oradata yu control01.ctl control02.ctl control03.ctl indx11.dbf indx12.dbf indx13.dbf indx14.dbf redo01.log r...