彻底搞清楚librarycachelock的成因和解决方法(二)

<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

上一个例子中我们主要借助于X$KGLLK基表和eventsystemstate解决问题,那么如果你不了解X$KGLLK基表,或者忘记了如何使用它,那也不要紧张,这里再介绍一种常规的方法。

从systemstate的转储信息中,我们已经注意到PROCESS28当前正在等待'librarycachelock'。
'handleaddress'表示的就是正持有PROCESS28进程所等待的librarycache中的地址。

现在我们继续在跟踪文件中查找包含'handle=c000000122e2a6d8'字符串的ORACLEPROCESS,也就是查找blockingsession的信息,发现信息如下:

PROCESS26: ----------------阻塞其他会话的进程,这里PROCESS26对应了V$PROCESS中的PID的值
 ----------------------------------------
 SO:c000000109c831e0,type:2,owner:0000000000000000,flag:INIT/-/-/0x00
 (process)Oraclepid=26,callscur/top:c00000010b2774d0/c00000010b2774d0,flag:(0)-
           interror:0,callerror:0,sesserror:0,txnerror0
 (postinfo)lastpostreceived:17246
             lastpostreceived-location:ksusig
             lastprocesstopostme:c000000109c840f8250
             lastpostsent:751404015
             lastpostsent-location:ksasnd
             lastprocesspostedbyme:c000000109c836e816
   (latchinfo)wait_event=0bits=0
   ProcessGroup:DEFAULT,pseudoproc:c000000109eefda0
   O/Sinfo:user:ora9i,term:UNKNOWN,ospid:20552
   OSDpidinfo:Unixprocesspid:20552,image:oracle@cs_dc02(TNSV1-V3)
   ----------------------------------------
   SO:c0000001180b9510,type:8,owner:c000000109c831e0,flag:INIT/-/-/0x00
   (FOB)flags=2fibptr=162e1b48incno=0pendingi/ocnt=0
   ----------------------------------------
   SO:c0000001180b9458,type:8,owner:c000000109c831e0,flag:INIT/-/-/0x00
   (FOB)flags=2fibptr=162deb18incno=0pendingi/ocnt=0
   ----------------------------------------
   SO:c0000001180b8230,type:8,owner:c000000109c831e0,flag:INIT/-/-/0x00
   (FOB)flags=2fibptr=162de848incno=0pendingi/ocnt=0
   ----------------------------------------
   SO:c0000001180b7b00,type:8,owner:c000000109c831e0,flag:INIT/-/-/0x00
   (FOB)flags=2fibptr=162de578incno=0pendingi/ocnt=0
   ----------------------------------------
   SO:c000000108c99e28,type:4,owner:c000000109c831e0,flag:INIT/-/-/0x00
c000000108c99e28对应的就是V$SESSION中的SADDR的值,通过这个信息就可以找到blockingsession的SID等信息
   (session)trans:c0000001169403c0,creator:c000000109c831e0,flag:(100041)USR/-BSY/-/-/-/-/-共14页  1             
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
阅读更多
个人分类: 数据库
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭