enq: TA – contention 等待事件

enq: TA – contention 等待事件


This enqueue is used when undo tablespace operations are being performed. Some examples of such
operations are:
When dropping an undo tablespace we acquire the enqueue in exclsuive mode to stop other sessions
using the undo tablespace at that point. If we cannot acquire the enqueue because the undo tablespace
is in use then we return an error.
When onlining an undo segment.
Undo segment recovery.
Instance shutdown.


The id1 value records the operation in use and maps to the following values under 11.2 (beta):
KTU_INSTANCE_SEG1 (1) – instance lock on undo segment lock 1
KTU_INSTANCE_IUP (2) – instance lock on instance existence
KTU_INSTANCE_SEG2 (3) – instance lock on undo segment lock 2
KTU_INSTANCE_EXC (4) – mutual-exclusive lock on starting up
KTU_XA_LOCKS (5) – transaction enqueue
KTU_INSTANCE_UT (6) – instance lock on undo tablespace
KTU_SWITCH_UT (7) – switch (& recovery of) undo tbs operation
KTU_INSTANCE_INIT (8) – undo segment initialisation (during start of cache recovery)
Id2 is typically used to identify the undo segment but for some operations it is just hard-coded as 0.





  1. oracle_ACS says

    enq: TA 实际上和latch: undo global data以及enq: US经常一起出现,代表undo上出现了争用.常见的情况是系统因为transaction过多而不停的offline/online undo segment; 我们可以通过下面的方式来对应相关的争用: a). 确保undo tablespace是够用的 b). 加大隐含参数_rollback_segment_count . 我们通常需要确认这是否是true contention,因为可能是某个进程出现了其它异常导致的这类事件而并不是在undo上发生了争用。 2. 如果确实是undo上的争用,最常见的问题就是undo tablespace size不足,或者默认的undo segment #不足(常见于巨量transaction的系统); 加大undo tablespace的大小或者对_rollback_segment_count设置更大的值可以作为一个workaround




沪公网安备 31010802001379号