问题描述
亲爱的,
希望你没事
我对活动重做日志文件有点困惑。
我知道活动的重做日志不是LGWR正在写入的当前重做日志文件。但是仍然有实例恢复所需的记录的那个。
但是文档说,在重做日志切换时,系统将执行完整的检查点,这意味着受此日志文件保护的脏块被写入磁盘。那么为什么我们仍然需要这个重做日志文件来恢复实例。
问候,
Imad
希望你没事
我对活动重做日志文件有点困惑。
我知道活动的重做日志不是LGWR正在写入的当前重做日志文件。但是仍然有实例恢复所需的记录的那个。
但是文档说,在重做日志切换时,系统将执行完整的检查点,这意味着受此日志文件保护的脏块被写入磁盘。那么为什么我们仍然需要这个重做日志文件来恢复实例。
问候,
Imad
专家解答
重做日志文件是否处于活动状态与块是否受到保护是一个单独的概念。正如医生所说:
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 next log file in the sequence when it becomes inactive.
http://docs.oracle.com/database/122/ADMIN/managing-the-redo-log.htm#ADMIN11308
关键是您需要重做日志来进行时间点恢复。所以你不能覆盖它们的内容,直到你把它们保存在其他地方 (存档的重做日志文件)。要阻止这种情况的发生,它们将保持活动状态,直到数据库将其存档为止。
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 next log file in the sequence when it becomes inactive.
http://docs.oracle.com/database/122/ADMIN/managing-the-redo-log.htm#ADMIN11308
关键是您需要重做日志来进行时间点恢复。所以你不能覆盖它们的内容,直到你把它们保存在其他地方 (存档的重做日志文件)。要阻止这种情况的发生,它们将保持活动状态,直到数据库将其存档为止。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。