latch: library cache pin等待事件
2011-08-09 10:43
483 查看
Library cache pins are used to manage library cache concurrence. Pinning an object causes the heaps to be loaded into memory (if not already loaded). PINS can be acquired in NULL, SHARE or EXCLUSIVE modes and can be considered like a special form of lock. A wait for a "library cache pin" implies some other session holds that PIN in an incompatible mode.
Solutions
Solution: If this is the case, the shared pool may need tuning. See Metalink Note:62143.1.
Problem: If the wait only appears on one or two sessions, the locking scenario is session specific. Collect the following evidence and contact Oracle support.
At a time when a wait is occurring:
select P1RAW from V$SESSION_WAIT where EVENT = 'library cache pin'
Use the P1RAW value for the following query to determine the object being waited on:
SELECT kglnaown "Owner", kglnaobj "Object"
FROM x$kglob
WHERE kglhdadr='&P1RAW'
The following SQL can be used to show the sessions that are holding and/or requesting pins on the object that given in P1RAW in the wait:
SELECT s.sid, kglpnmod "Mode", kglpnreq "Req"
FROM x$kglpn p, v$session s
WHERE p.kglpnuse=s.saddr
AND kglpnhdl='&P1RAW'
- An X request (3) will be blocked by any pins held S mode (2) on the object.
- An S request (2) will be blocked by any X mode (3) pin held, or may queue behind some other X request.
This information can be used to identify the blocker and kill the session for a quick fix.本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277934
Solutions
Solution: If this is the case, the shared pool may need tuning. See Metalink Note:62143.1.
Problem: If the wait only appears on one or two sessions, the locking scenario is session specific. Collect the following evidence and contact Oracle support.
At a time when a wait is occurring:
select P1RAW from V$SESSION_WAIT where EVENT = 'library cache pin'
Use the P1RAW value for the following query to determine the object being waited on:
SELECT kglnaown "Owner", kglnaobj "Object"
FROM x$kglob
WHERE kglhdadr='&P1RAW'
The following SQL can be used to show the sessions that are holding and/or requesting pins on the object that given in P1RAW in the wait:
SELECT s.sid, kglpnmod "Mode", kglpnreq "Req"
FROM x$kglpn p, v$session s
WHERE p.kglpnuse=s.saddr
AND kglpnhdl='&P1RAW'
- An X request (3) will be blocked by any pins held S mode (2) on the object.
- An S request (2) will be blocked by any X mode (3) pin held, or may queue behind some other X request.
This information can be used to identify the blocker and kill the session for a quick fix.本文出自 “Ask Maclean Liu Oracle” 博客,请务必保留此出处http://maclean.blog.51cto.com/2923249/1277934
相关文章推荐
- latch: library cache pin等待事件
- 怎么发现RAC环境中'library cache pin'等待事件的堵塞者(Blocker)?
- library cache pin等待事件处理
- 怎么发现RAC环境中'library cache pin'等待事件的阻塞者(Blocker)?
- library cache pin等待事件的处理
- 关于cursor: pin S wait on X 和 library cache pin 及其他等待事件
- library cache pin等待事件
- LIBRARY CACHE PIN 等待事件
- 发现个library cache LOCK AND library cache pin 等待事件
- library cache latch等待事件
- [转载]编译存储过程时遇到的library cache pin等待事件解决过程
- library cache latch等待事件
- latch:library cache lock等待事件
- 关于library cache pin和lock等待事件的理解
- latch:library cache lock等待事件
- Latch: cache buffer chains等待事件的学习
- 遇到Library cache load lock 等待事件
- library cache pin和lock等待分析
- 等待事件:latch:cache buffer chains
- cursor:mutex S和library cache lock 等待事件