理解redo(8)redo和undo的一点关系及删除联机日志文件组的注意事项

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值