Oracle oradebug中止、挂起LGWR进程(Suspend LGWR Process)
2017-06-01 15:58
519 查看
Oracle Core: Essential Internals for DBAs and Developers 书中有一段关于挂起LGWR进程的描述,实验如下:
总结:用户commit成功的前提条件是事务相关的log buffer都已经写入到磁盘online redo log中。将LGWR进程挂起,导致无法写log buffer,自然也就无法提交成功。
附:
LGWR进程从log buffer往online redo log写日志的5个场景:
用户提交事务;
在线日志发生切换;
每3秒;
redo log buffer 1/3满,或者缓存数据达到1m;
DBWn进程必须要写data buffer到磁盘。(在DBWn写data buffer到磁盘之前,与这些buffer修改相关的redo log必须先写到磁盘,write-ahead协议)。
--获取LGWR的pid --10g以前 select prc.pid, bgp.name from v$bgprocess bgp, v$process prc where bgp.name = 'LGWR' and prc.addr = bgp.paddr; --10g及以后 select prc.pid, prc.pname from v$process prc where prc.pname = 'LGWR'; --返回的pid为11,以下操作按时间顺序 --session1 中止lgwr进程 SQL> oradebug setorapid 11 Oracle pid: 11, Unix process pid: 2401, image: oracle@sean.ora11g (LGWR) SQL> oradebug suspend Statement processed. --session2 SQL> insert into t values(1); 1 row created. SQL> commit; hang住 --session1 SQL> oradebug resume Statement processed. --session2 Commit complete.
总结:用户commit成功的前提条件是事务相关的log buffer都已经写入到磁盘online redo log中。将LGWR进程挂起,导致无法写log buffer,自然也就无法提交成功。
附:
LGWR进程从log buffer往online redo log写日志的5个场景:
用户提交事务;
在线日志发生切换;
每3秒;
redo log buffer 1/3满,或者缓存数据达到1m;
DBWn进程必须要写data buffer到磁盘。(在DBWn写data buffer到磁盘之前,与这些buffer修改相关的redo log必须先写到磁盘,write-ahead协议)。
相关文章推荐
- MFC任务管理器task manager----进程的挂起与恢复--NtSuspendProcess&&NtResumeProcess
- MFC任务管理器task manager----进程的挂起与恢复--NtSuspendProcess&&NtResumeProcess
- 关于oracle ogg复制进程挂起的处理
- oracle教程之DBWn、CKPT、LGWR进程之间的合作
- Oracle Process Architecture - Oracle 进程结构篇1
- win32程序如何挂起/恢复(suspend/resume)进程
- Oracle Process Architecture - Oracle 进程结构篇4
- oracle 的服务器进程(PMON, SMON,CKPT,DBWn,LGWR,ARCn,MMON)
- oracle教程之DBWn、CKPT、LGWR进程之间的合作
- Oracle进程详解--DBWn,CKPT,LGWR
- ORACLE的主要进程DBWn,LGWR的工作原理
- oracle 10g进程之DBWn、LGWR、SMON
- 用oradebug挂起进程
- Oracle后台进程之:Oracle Mandatory Background Processes (PMON、SMON、LGWR、DBWN、CKPT、MMON、MMNL、RECO)
- 使用oradebug挂起进程
- 用oradebug short_stack及strace -p分析oracle进程是否dead或出现故障
- oracle中如何修改process(进程)
- 1、oracle后台进程(数据字典V$BGPROCESS)
- oracle 的服务器进程(PMON, SMON,CKPT,DBWn,LGWR,ARCn)
- Backgroud process oracle后台进程