Library Cache Lock 2004-06-02 - By Diego Cutrone
library cache lockDave,
To find out which session is blocking you you can also try this one:
select sid Holder ,KGLLKUSE Sesion , KGLLKMOD Held, KGLLKREQ Req
from x$kgllk , v$session
where KGLLKHDL in (select p1raw from v$session_wait
where wait_time=0 and event like 'library cache lock% ')
and KGLLKMOD < > 0
and v$session.saddr=x$kgllk.kgllkuse
/
Then after identifying the blocking session, you can go from there
HTH
Regards,
Diego
-- -- Original Message -- --
From: David Sharples
To: oracle-l@(protected)
Sent: Wednesday, June 02, 2004 5:44 AM
Subject: library cache lock
Hi, got a strange problem. I am trying to truncate a partition in a table, but it just hangs forever, it is waiting on a library cache lock. Anyone know why and how I can clear it - flushing the shared pool didn 't help and there are no other sessions touching that table.
Thanks
Dave
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML > <HEAD > <TITLE >library cache lock </TITLE >
<META http-equiv=Content-Type content= "text/html; charset=iso-8859-1 " >
<META content= "MSHTML 6.00.2800.1400 " name=GENERATOR >
<STYLE > </STYLE >
</HEAD >
<BODY bgColor=#ffffff >
<DIV > <FONT face=Arial size=2 >Dave, </FONT > </DIV >
<DIV > <FONT face=Arial size=2 > </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >To find out which session is blocking you you can
also try this one: </FONT > </DIV >
<DIV > <FONT face=Arial size=2 > </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >select sid Holder ,KGLLKUSE Sesion , KGLLKMOD Held,
KGLLKREQ Req <BR >from x$kgllk , v$session <BR >where KGLLKHDL in (select p1raw from
v$session_wait
<BR >
where wait_time=0 and event like 'library cache lock% ') <BR >and KGLLKMOD <>
0 <BR >and v$session.saddr=x$kgllk.kgllkuse <BR >/ <BR > </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >Then after identifying the blocking session, you
can go from there </FONT > </DIV >
<DIV > <FONT face=Arial size=2 > </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >HTH </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >Regards, </FONT > </DIV >
<DIV > <FONT face=Arial size=2 >Diego </DIV > </FONT >
<DIV > <FONT face=Arial size=2 > </FONT > </DIV >
<DIV > <FONT face=Arial size=2 > </FONT > </DIV >
<BLOCKQUOTE dir=ltr
style= "PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px " >
<DIV style= "FONT: 10pt arial " >-- -- Original Message -- -- </DIV >
<DIV
style= "BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black " > <B >From: </B >
<A title=dsharples@(protected)
href= "mailto:dsharples@(protected) " >David Sharples </A > </DIV >
<DIV style= "FONT: 10pt arial " > <B >To: </B > <A title=oracle-l@(protected)
href= "mailto:oracle-l@(protected) " >oracle-l@(protected) </A > </DIV >
<DIV style= "FONT: 10pt arial " > <B >Sent: </B > Wednesday, June 02, 2004 5:44
AM </DIV >
<DIV style= "FONT: 10pt arial " > <B >Subject: </B > library cache lock </DIV >
<DIV > <BR > </DIV > <!-- Converted from text/rtf format -- >
<P align=left > <SPAN lang=en-gb > <FONT face=Arial size=2 >Hi, got a strange
problem. I am trying to truncate a partition in a table, but it just
hangs forever, it is waiting on a library cache lock </FONT > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial
size=2 >. Anyone know why and how I can clear it </FONT > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial
size=2 >? </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-gb > <FONT face=Arial size=2 > </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial
size=2 >flushing </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial size=2 > the
sh </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-gb > <FONT face=Arial size=2 >a </FONT > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial
size=2 >red pool </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial
size=2 >didn?t </FONT > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-gb > <FONT face=Arial size=2 > help and there are
no other sessions touching that table. </FONT > </SPAN > </P >
<P align=left > <SPAN lang=en-gb > <FONT face=Arial
size=2 >Thanks </FONT > </SPAN > </P >
<P align=left > <SPAN lang=en-gb > <FONT face=Arial size=2 >Dave </FONT > </SPAN > <SPAN
lang=en-us > </SPAN > <SPAN lang=en-us > </SPAN > <SPAN
lang=en-gb > </SPAN > </P > </BLOCKQUOTE > </BODY > </HTML >