redo和undo的一點關系及刪除聯機日志文件組的注意事項

1) redo和undo的藕斷絲連 前滾redo 回滾undo undo受到redo的保護,以便歷經前滾后在buffer cache中得到undo,并將這些undo運用到buffer cache里的數據塊和索引塊上,使那些數據文件能趕上數據庫的其余部分,從而保持數據庫的一致性。 二者是DBA和開發人員的橋

1) redo和undo的“藕斷絲連”

前滾redo

回滾undo

undo受到redo的保護,以便歷經前滾后在buffer cache中得到undo,并將這些undo運用到buffer cache里的數據塊和索引塊上,使那些數據文件能“趕上”數據庫的其余部分,從而保持數據庫的一致性。

二者是DBA和開發人員的橋梁

回滾過程絕不涉及重做日志,只有恢復和歸檔時會讀取重做日志。因為,重做日志是用來寫的,而不是用來讀!

2) 刪除聯機重做日志文件組的注意事項

①日志組為active和current狀態時不可以刪除

②日志組在數據庫級別刪除后操作系統上的文件不會被級鏈刪除

③對于一個Oracle數據庫實例,至少要包含兩個聯機重做日志組

3) redo buffer由誰來寫入?

> redo buffer的寫入 也是 lgwr嗎?

No. Server (shadow) processes write to log buffer. LGWR writes redo records from the log buffer to the log file.

> 而undo buffer因為就是在db cache buffer,所以也是DBWR讀入的嗎?

Not quite sure what you mean. “Undo buffer” is just a buffer in buffer cache that corresponds to a block in an undo tablespace.

Treat it like any other data block. It’s written into buffer cache by a server process and written out to datafiles by DBWn.

> 涉及IO(特別是異步),就需要一個專門的進程來完成

A server process can always read datafiles. But normally only DBWn can write to them. Also remember a server process can read and write a tempfile

? 版權聲明
THE END
喜歡就支持一下吧
點贊7 分享