1)
redo和undo的“藕斷絲連”
前滾redo
回滾undo
undo受到redo的保護(hù),以便歷經(jīng)前滾后在buffer cache中得到undo,并將這些undo運(yùn)用到buffer cache里的數(shù)據(jù)塊和索引塊上,使那些數(shù)據(jù)文件能“趕上”數(shù)據(jù)庫(kù)的其余部分,從而保持?jǐn)?shù)據(jù)庫(kù)的一致性。
二者是DBA和開(kāi)發(fā)人員的橋梁
回滾過(guò)程絕不涉及重做日志,只有恢復(fù)和歸檔時(shí)會(huì)讀取重做日志。因?yàn)椋刈鋈罩臼怯脕?lái)寫的,而不是用來(lái)讀!
2) 刪除聯(lián)機(jī)重做日志文件組的注意事項(xiàng)
①日志組為active和current狀態(tài)時(shí)不可以刪除
②日志組在數(shù)據(jù)庫(kù)級(jí)別刪除后操作系統(tǒng)上的文件不會(huì)被級(jí)鏈刪除
③對(duì)于一個(gè)Oracle數(shù)據(jù)庫(kù)實(shí)例,至少要包含兩個(gè)聯(lián)機(jī)重做日志組
3) redo buffer由誰(shuí)來(lái)寫入?
> 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因?yàn)榫褪窃赿b 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(特別是異步),就需要一個(gè)專門的進(jìn)程來(lái)完成
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
理解redo(8)redo和undo的一點(diǎn)關(guān)系及刪除聯(lián)機(jī)日志文件組的注意事項(xiàng)
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
