SQL> select sid,saddr from v$session where saddr in ('2F397004','2E063BA8','2F391B2C');
SID SADDR
---------- --------
20 2F397004
22 2F391B2C ----被堵塞 library cache lock
1137 2E063BA8 ----被堵塞 library cache pin
SQL> select * from dba_kgllock where KGLLKREQ >0;
KGLLKUSE KGLLKHDL KGLLKMOD KGLLKREQ KGLL
-------- -------- ---------- ---------- ----
2F391B2C 31A3F6FC 0 3 Lock
2E063BA8 31A3F6FC 0 3 Pin
SQL> select * from dba_kgllock where KGLLKHDL='31A3F6FC';
KGLLKUSE KGLLKHDL KGLLKMOD KGLLKREQ KGLL
-------- -------- ---------- ---------- ----
2F391B2C 31A3F6FC 0 3 Lock
2F397004 31A3F6FC 1 0 Lock
2E063BA8 31A3F6FC 3 0 Lock
2E063BA8 31A3F6FC 0 3 Pin
2F397004 31A3F6FC 2 0 Pin
其中
<pre name="code" class="sql">KGLLKUSE <span style="font-family: Arial, Helvetica, sans-serif;"> = SADDR</span>
KGLLKHDL ---句柄 KGLLKMOD 持有pin/lock的模式(0为no lock/pin held﹐1为null,2为share﹐3为exclusive)KGLLKREQ 请求pin/lock的模式(0为no lock/pin held﹐1为null,2为share﹐3为exclusive)
dba_kgllock解释
最新推荐文章于 2021-10-15 09:39:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)