- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2013-8-13 15:08:48
SQL> select view_definition
2 from v$fixed_view_definition
3 where view_name = 'GV$OPEN_CURSOR';
VIEW_DEFINITION
--------------------------------------------------------------------------------
select inst_id,
kgllkuse,
kgllksnm,
user_name,
kglhdpar,
kglnahsh,
kgllksqlid,
kglnaobj,
kgllkest,
decode(kgllkexc, 0, to_number(NULL), kgllkexc),
kgllkctp -- CURSOR_TYPE
from x$kgllk
where kglhdnsp = 0
and kglhdpar != kgllkhdl
KGLHDPAR!=KGLLKHDL 该条件排除了父游标,所以V$OPEN_CURSOR列出的均是child cursor
KGLHDNSP ==> NAME SPACE =0
SQL> select distinct kgllkctp from X$kgllk;
KGLLKCTP
----------------------------------------------------------------
SESSION CURSOR CACHED
PL/SQL CURSOR CACHED
OPEN
OPEN-RECURSIVE
DICTIONARY LOOKUP CURSOR CACHED
BUNDLE DICTIONARY LOOKUP CACHED
OPEN CURSOR本质上还是一种 null breakable library cache lock , breakable lcl的目的就是为了快速定位一个游标, |
|