LIBRARY CACHE LOCK WAITS AND NO BLOCKER FOUND
資料庫過程無法除錯,看了一下等待事件,發現是library cache pin。
--檢視等待的的會話
SQL> select sid,seq#,event,p1,p1raw,p2,p2raw,p3,p3raw,state from v$session_wait where event like 'library%';
SID SEQ#
EVENT
P1 P1RAW P2 P2RAW P3
P3RAW STATE
---------- ----------
----------------------------------------------------------------
---------- ---------------- ---------- ---------------- ----------
---------------- -------------------
39 647 library
cache pin 5.04403172
07000003587A4D78 5.04403173 070000037DC33240 200 00000000000000C8
WAITING
522 40434 library cache
lock 5.04403173
07000003712ED5F8 5.04403172 070000034E34E590 1301 0000000000000515
WAITING
--等待的物件
SQL> select sw.sid,xb.kglhdadr as addr,xb.kglhdpar as parent_addr ,xb.kglnaown as owner,xb.kglnaobj
2 from x$kglob xb,v$session_wait sw
3 where xb.kglhdadr = sw.p1raw
4 and sw.event like 'library%' ;
SID ADDR PARENT_ADDR OWNER KGLNAOBJ
----------
---------------- ----------------
----------------------------------------------------------------
--------------------------------------------------------------------------------
39 07000003587A4D78
07000003584CF198
begin --sys.dbms_session.reset_package;
sys.dbms_debug.probe_version(major =
522 07000003712ED5F8 07000003712ED5F8 SYS DBMS_DEBUG
--鎖定情況
SQL> SELECT a.SID, a.username,
2 case b.kglpnmod when 2 then 'S' when 3 then 'X' end "Mode",
3 case b.kglpnreq when 2 then 'S' when 3 then 'X' end "Req" ,
4 a.program, b.addr, b.kglpnadr, b.kglpnuse,b.kglpnses, b.kglpnhdl, b.kglpnlck
5 FROM v$session a, x$kglpn b
6 WHERE a.saddr = b.kglpnuse
7 --AND b.kglpnmod <> 0
8 AND b.kglpnhdl IN (SELECT p1raw FROM v$session_wait WHERE event LIKE 'library%') ;
SID USERNAME
Mode Req
PROGRAM ADDR
KGLPNADR KGLPNUSE KGLPNSES KGLPNHDL
KGLPNLCK
---------- ------------------------------
-------------------------------- --------------------------------
------------------------------------------------ ----------------
---------------- ---------------- ---------------- ----------------
----------------
39
MAIN
S
plsqldev.exe 0000000110381F78
070000037DC33240 070000032B417910 070000032B417910 07000003587A4D78
070000034E4A2300
522 MAIN
X
plsqldev.exe 0000000110381FD0
07000003691C1980 070000032D45E4B0 070000032D45E4B0 07000003587A4D78
070000034E27CEF0
會話39是在等待pin 07000003587A4D78 ,而07000003587A4D78 被會話522以模式X lock住,所以一直等待。
但是522已經執行了幾天了,它又在等待07000003712ED5F8(dbms_debug)上加X鎖,它又是被誰阻塞了呢?
做了個systemstate trace,但是也找不到holder
[/oracle]$sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Jul 27 20:30:05 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.8.0 - Production
SQL> ALTER SESSION SET MAX_DUMP_FILE_SIZE=UNLIMITED;
Session altered.
SQL> ALTER SYSTEM SET EVENTS 'IMMEDIATE TRACE NAME SYSTEMSTATE LEVEL 10';
System altered.
開SR後,得到答覆是:
|
||||
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10867315/viewspace-670642/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- library cache pin和library cache lock(一)
- library cache pin和library cache lock (zt)
- library cache pin和library cache lock(二)
- library cache lock和library cache bin實驗_2.0
- Library Cache最佳化篇(一)降低library cache lock和library cache pin的方法
- latch:library cache lock等待事件事件
- [20240920]跟蹤library cache lock library cache pin使用gdb.txt
- [20240824]跟蹤library cache lock library cache pin使用gdb.txt
- Library Cache 診斷:Lock, Pin 以及 Load Lock (文件 ID 1548524.1)
- 【TUNE_ORACLE】等待事件之“library cache lock”Oracle事件
- 一次library cache lock 問題分析
- [20241108]跟蹤library cache lock library cache pin使用gdb(11g)4.txt
- [20241108]跟蹤library cache lock library cache pin使用gdb(11g)3.txt
- [20241105]跟蹤library cache lock library cache pin使用gdb(11g)2.txt
- 【ASM_ORACLE】Library Cache最佳化篇(二)Library cache load lock的概念和解決辦法ASMOracle
- 【ASK_ORACLE】Library cache pin 與 library load lock的關係和區別Oracle
- 徹底搞清楚library cache lock的成因和解決方法(轉)
- Oracle Library cacheOracle
- [20240827]分析為什麼出現library cache lock等待事件2.txt事件
- [20240828]分析為什麼出現library cache lock等待事件5.txt事件
- Oracle 11g 密碼延遲認證與 library cache lock 等待Oracle密碼
- library cache pin(轉)
- Android:Unexpected lock protocol found in lock file. Expected 3, found 0.AndroidProtocol
- 【等待事件】library cache pin事件
- 【ASK_ORACLE】Library Cache概念篇(二)之Library Cache Pin的定義Oracle
- Buffer Cache以及buffer busy waits/gc相關事件AIGC事件
- [20210507]dump library_cache.txt
- [20190402]Library Cache mutex.txtMutex
- Oracle11g 密碼延遲認證導致library cache lock的情況分析Oracle密碼
- 故障:核心表業務高峰期授權導致library cache lock和mutex x競爭Mutex
- [20210507]分析library cache轉儲.txt
- xcode10 library not found for -lstdc++.6.0.9XCodeC++
- [20210507]dump library_cache 2.txt
- DBA手記(學習)-library cache pin
- 批次錯誤使用者名稱與密碼導致業務使用者HANG住(library cache lock)密碼
- [20210524]分析library cache轉儲 3.txt
- [20210524]分析library cache轉儲 4.txt
- [20210508]分析library cache轉儲 2.txt
- [20210602]分析library cache轉儲 5.txt