redo log files
重做日志文件是ORACLE恢复种很重要的一种数据文件,它是事务的日志 。通常用于以下工作:
系统崩溃后的实例恢复
通过备份恢复 数据文件之后恢复介质
备用数据库处理
输入到流中。
如果你发生了以下情况,你就能用到它:
实例或介质失败
备份数据库的维护
包含数据文件的磁盘损坏
无意删除了一个表,或者删除了一些重要信息,而且提交了操作,就可以利用备份回到发生错误的时间点前
ORACLE中几乎每个操作都会产生重做日志
重做日志分为:在线重做日志和归档日志
在线重做日志:一般有几组重做日志 ,并且每一组中可能有多个成员,某个成员的算坏 ,并不影响数据的使用,可以通过清除,重新建立重做日志
在线重做日志 大小时固定的,并且是循环使用的.
这里有几个比较重要的名词 :检查点、DBWR、数据库缓冲区(database buffer cache) redo log buffer 重做日志缓冲区
设置在线重做日志大小时要考虑三个问题:
高峰负载
大量用户修改相同的块
平均恢复时间
归档重做日志:
ORACLE数据库可以运行在两种模式:ARCHIVELOG或NO ARCHIVELOG模式,区别就是重做日志重用时如何处理。
在归档模式下,会保留一个副本,在非归档模式下会重写
Active (Current) and Inactive Redo Log Files
如果你的每个重做日志都处于活动状态,可能说明你的重做日志大小有问题,或者磁盘IO有问题
Oracle Database uses only one redo log files at a time to store redo records written from the redo log buffer. The redo log file that LGWR is actively writing to is called the current redo log file.
Redo log files that are required for instance recovery are called active redo log files. Redo log files that are no longer required for instance recovery are called inactive redo log files.
If you have enabled archiving (the database is in ARCHIVELOG mode), then the database cannot reuse or overwrite an active online log file until one of the archiver background processes (ARCn) has archived its contents. If archiving is disabled (the database is in NOARCHIVELOG mode), then when the last redo log file is full, LGWR continues by overwriting the first available active file.
Multiplexing Redo Log Files
这个主要 时为了避免磁盘故障导致日志文件丢失
回家继续写


