enqueue lock wait等待事件
2011-08-08 20:02
239 查看
Enqueues are sophisticated locks for managing access to shared resources like tables, rows, jobs, and redo threads. An enqueue can be requested in different levels/mode: null, row share, row exclusive, share, share row exclusive or exclusive. This wait event indicates a wait for a lock that is held by another session (or sessions) in an incompatible mode to the requested mode.
Isolating contention:
Once an enqueue resource contention problem has been identified with Ignite, one can quickly isolate the SQL and sessions that are suffering. Often, the SQL is a good clue to what objects have locking contention.
During a period of time when locking is typically a problem, use the following query to find out what session is requesting a lock, the type and mode of the requested lock and the session that is blocking.
SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess, id1, id2, lmode, request, type
FROM V$LOCK
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM V$LOCK WHERE request>0)
ORDER BY id1, request;
Solutions
There are many types of locks in Oracle and each has a unique contention remedy. The following are the most common sources of contention:
TX本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277924
Isolating contention:
Once an enqueue resource contention problem has been identified with Ignite, one can quickly isolate the SQL and sessions that are suffering. Often, the SQL is a good clue to what objects have locking contention.
During a period of time when locking is typically a problem, use the following query to find out what session is requesting a lock, the type and mode of the requested lock and the session that is blocking.
SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess, id1, id2, lmode, request, type
FROM V$LOCK
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM V$LOCK WHERE request>0)
ORDER BY id1, request;
Solutions
There are many types of locks in Oracle and each has a unique contention remedy. The following are the most common sources of contention:
TX本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277924
相关文章推荐
- enqueue lock wait等待事件
- 【翻译自mos文章】在12c中Create or Truncate Table时很慢,等待事件为 DFS Lock Handle wait
- 排查MySQL事务没有提交导致 锁等待 Lock wait timeout exceeded
- wait for a undo record等待事件
- 等待事件之--关于 scatter read wait事件
- 关于library cache pin和lock等待事件的理解
- <转载>c# 线程同步: 详解lock,monitor,同步事件和等待句柄以及mutex
- Free buffer waits 等待事件总结
- MySQL 事务没有提交导致 锁等待 Lock wait timeout exceeded
- 一次数据库hang,大量enqueue等待事件的问题
- Oracle等待事件DFS lock handle
- 【MySQL】事务没有提交导致 锁等待Lock wait timeout exceeded异常
- C# 多线程(lock,Monitor,Mutex,同步事件和等待句柄)
- c# 线程同步: 详解lock,monitor,同步事件和等待句柄以及mutex(ZT)
- Oracle 11g下重现library cache lock等待事件
- MySQL 事务没有提交导致 锁等待 Lock wait timeout exceeded
- MySQL 事务没有提交导致 锁等待 Lock wait timeout exceeded
- enq:SQ contention / row cache lock / DFS lock handle(SV) 等待事件 说明
- Mysql事物锁等待超时 Lock wait timeout exceeded; try restarting transaction
- Oracle “enq: TX - row lock contention 等待事件 ”