Oracle Internals Notes Redo Write Triggers
There are four conditions that cause LGWR to perform a redo write.
- When LGWR is idle, it sleeps on an rdbms ipc message wait with a timeout of 3 seconds (as does DBWn). If this sleep times out and LGWR finds that there is some redo available to write, a background write is performed spontaneously.
- Whenever a process allocates space in the log buffer, the number of used log buffer blocks is calculated. If the number of used blocks is greater than or equal to the number of blocks specified by the _log_io_size parameter, and if LGWR is not already active, then LGWR is posted to perform a background write. The default value for _log_io_size is 1/3 of the log buffer expressed in log blocks, with an upper bound equivalent to 1 Mb from release 8.0. As with many other hidden parameters, unless set explicitly, the _log_io_size parameter reports as zero in X$KSPPSV.
- When a transaction commits, it generates a commit marker in the redo stream. However, the transaction is not recoverable until the log block containing that commit marker has been flushed to disk. So, before the process finishing the transaction can return a response to the user, it must wait for LGWR to flush that log block to disk. The process therefore posts LGWR and then sleeps on a log file sync wait with a timeout of 1 second. For completeness, the _wait_for_sync parameter can be set to FALSE to avoid waiting for redo to be synced, but doing so voids any guarantee of recoverability for committed transactions upon instance failure.
Note that commits within recursive calls (such as procedural code execute calls) do not need to sync their redo until a response is about to be returned to the user. Therefore recursive calls just sync the commit RBA of their most recent COMMIT upon return to the user call. They do not sync each commit.
An SGA variable (kcrfshsb, according to bug 182447) is used to communicate the log block number up to which the redo thread needs to be synced. If several commits occur in distinct transactions before LGWR wakes up, this variable records the highest log block number that needs to be synced, and the commit markers are all flushed to disk in a single redo write. This is sometimes called a group commit.
- When DBWn needs to write one or more blocks for which the high RBA is beyond LGWR's on-disk RBA, from Oracle 8i, it places those blocks into its deferred write queue and posts LGWR to sync the highest high RBA, but it does not wait. Instead DBWn continues to process other writes that do not need to be deferred. Prior to release 8i, DBWn used to sleep on a log file sync wait in this case.
Oracle Internals Notes Redo Write Triggers的更多相关文章
- Oracle Internals 相关站点
http://oracle-internals.com/blog/links/ http://coll15.mapyourshow.com/6_0/sessions/session-details.c ...
- Oracle Dataguard Standby Redo Log的两个实验
在Data Guard环境中,Standby Redo Log是一个比较特殊的日志类型.从最新的DG安装指导中,都推荐在Primary和Standby端,都配置Standby Redo Log. 简单 ...
- ORACLE STUDY NOTES 01
[JSU]LJDragon's Oracle course notes In the first semester, junior year DML数据操纵语言 DML指:update,delete, ...
- ORACLE STUDY NOTES 02
[JSU]LJDragon's Oracle course notes In the first semester, junior year I.用户和权限 1.用户操作 --创建新用户 CREATE ...
- Oracle logminer 分析redo log(TOAD与PLSQL)
Oracle logminer 分析redo log Oracle 11g r2 RAC centos 6.5 设置时间格式 select to_char(sysdate,'yyyy-mm-dd hh ...
- Oracle 11g的Redo Log和Archive Log的分析方法
自Oracle 11g起,无需设置UTL_FILE_DIR就可以使用LOGMNR对本地数据库的日志进行分析,以下是使用LOGMNR的DICT_FROM_ONLINE_CATALOG分析REDO和归档日 ...
- Oracle Metalink Notes Collection
INV Note 123456.1 Latest 11i Applications Recommended Patch List Note 568012.1:FAQ: Inventory Standa ...
- oracle(十二)redo 与 undo
1.undo:回滚未提交的事务.未提交前,内存不够用时,DBWR将脏数据写入数据文件中,以腾出内存空间. 这就是undo存在的原因. redo:恢复所有已提交的事务 2.实例失败(如主机掉电)可能出现 ...
- Oracle重做日志REDO
什么是重做? 重做日志包含所有数据产生的历史改变记录. 重做日志目的是保证数据的安全,如果数据因特殊原因没有写到磁盘上,可以通过重做日志来恢复. 重做日志文件通常用于 恢复(实例恢复和介质恢复) 日志 ...
随机推荐
- css基础—字体那些事
css基础-字体那些事 1. 首先讲字的大小样式等 字体大小 font-size: 40px; 文字字体 font-family: "宋体",Arial; 文字样式 font-st ...
- 关于Java协变性的思考
简而言之,如果A IS-A B,那么A[] IS-A B[]. 举例:现在有类型Person.Employee和Student.Employee 是一个(IS-A) Person,Student是一个 ...
- CMAK找不到相关编译器的问题
本机安装了vs2019,在编译vulkansdk所带的samples时,遇到 错误提示: CMake Error at CMakeLists.txt: (project): Generator Vis ...
- java创建对象方法列表
引用 不用构造方法也能创建对象 前言 java中对象创建的方法主要包括,1,使用new关键字,2.使用clone方法,3.反射机制,4.反序列化.其中1,3都会明确的显式的调用构造函数.2是在内存上对 ...
- docker-dnsmasq使用
docker-dnsmasq支持通过web页面配置域名映射,镜像地址:https://hub.docker.com/r/jpillora/dnsmasq 使用步骤如下: 1.在Docker宿主上创建 ...
- IBM Security App Scan Standard 工具的使用
1.AppScan是什么? AppScan是IBM的一款web安全扫描工具,可以利用爬虫技术进行网站安全渗透测试,根据网站入口自动对网页链接进行安全扫描,扫描之后会提供扫描报告和修复建议等. AppS ...
- UI自动化之js\jquery的应用
js\jquery的应用,有很多难以定位到的,可以通过js或者jquery来处理 目录 1.js 2.jquery 1.js 1.1js有5种定位,最后execute_script(js)来执行js ...
- delphi开发实例:保存字体设置的方法
http://blog.csdn.net/delphi308/article/details/9906147 delphi开发实例:保存字体设置的方法 2013-08-11 22:37 446人阅读 ...
- Postman + Newman 生成测试报告
1.安装Node.js 下载地址: https://nodejs.org/download/ 2.安装Newman 1) 打开cmd,输入:npm install -g newman 2) 安装支持N ...
- linux上搭建nginx+ftp,实现文件的上传与访问
ftp服务器搭建 1.新建用户ftpuser并指定主目录为/home/ftpuser (注意:这个目录是后面存储和读取文件的目录) <!--创建用户并指定主目录--> useradd -d ...