首页 > 应用开发 > IT综合 > library cache pin
The library cache pin wait event is related to contention for library cache objects.
1. Look up the name of the object that the pin is for using the P1RAW value supplied by the CURRENT_EVENT cursor:
select kglnaobj
from x$kglob
where inst_id = userenv('instance')
and kglhdadr = ; 2. Find out who is blocking, the statement that is executing, and the mode in which the object is being held using the P1RAW value supplied by the CURRENT_EVENT cursor:
select a.sid, a.serial#, a.username, a.paddr, a.logon_time,
a.sql_hash_value, b.kglpnmod
from v$session a, sys.x$kglpn b
where a.saddr = b.kglpnuse
and b.inst_id = userenv('instance')
and b.kglpnreq = 0
and b.kglpnmod not in (0,1)
and b.kglpnhdl = ; 3. Obtain the SQL statement that is associated with the library cache pin event using the hash value supplied by the CURRENT_EVENT cursor:
select hash_value, address, piece, sql_text
from v$sqltext
where hash_value =
order by piece;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/178357/viewspace-896954/ ,如需转载,请注明出处,否则将追究法律责任。