oracle wait enq event of: CF - contention

Enqueue is a locking mechanism for shared resources protection against damage due to concurrent operation data, Enqueue queuing mechanism, i.e., FIFO (First In First Out) to control the use of resources. When any action needs to read the control file, it will wait for the occurrence of an event enq: CF - contention, CF locks are used to serialize controlfile transaction, use the lock when the read and write control file. The locks are usually allotted time is very short, such as in the following events will be allocated to the lock, then it might happen enq: CF - contention wait events:

  Checkpoint

   Redo switching the Logfile

   Redo lofileg archive

   perform instance recovery

   operation redo logfile

   Hot Standby start and end

   DML operations Nologging things

If a thing is set nologging property, then the following actions are more likely to wait for the event:

direct load (SQL*Loader)

direct-load INSERT

CREATE TABLE ... AS SELECT

CREATE INDEX

ALTER TABLE ... MOVE PARTITION

ALTER TABLE ... SPLIT PARTITION

ALTER INDEX ... SPLIT PARTITION

ALTER INDEX ... REBUILD

ALTER INDEX ... REBUILD PARTITION

INSERT, UPDATE, and DELETE on LOBs in   NOCACHE NOLOGGING mode stored out of line

       查询该等待事件的holder

select l.sid, p.program, p.pid, p.spid,   s.username, s.terminal, s.module, s.action, s.event, s.wait_time,   s.seconds_in_wait, s.state

from v$lock l, v$session s, v$process p

where l.sid = s.sid

and s.paddr = p.addr

and l.type='CF'

and l.lmode >= 5;

       查询该等待事件的waiter

select l.sid, p.program, p.pid, p.spid,   s.username, s.terminal, s.module, s.action, s.event, s.wait_time,   s.seconds_in_wait, s.state

from v$lock l, v$session s, v$process p

where l.sid = s.sid

and s.paddr = p.addr

and l.type='CF'

and l.request >= 5;

       原因分析及解决办法:郑州不孕不育医院:http://mobile.zzchxbyy.com/

如果holder是后台进程,比如lgwr,ckpt,arcn等,那么检查redo log大小,切换频次,检查fast_start_mttr_target的设置,检查归档路径是否可用。

如果是holder是前台进程,那么大都是由于nologging的事物上正在发生DML或者DDL,此时由于nologging属性,那么oracle需要向控制文件中记录unrecoverable SCN,典型的是伴随enq: CF – contention的通常还有control file parallel write,这个会话在写的过程中持有CF locks,其它会话如果也要更新控制文件的话,那么就要等待了。


Guess you like

Origin blog.51cto.com/14510269/2435792