如何在 Oracle 中显示打开的光标?
问题
您想在 Oracle 中显示打开的光标。
解决方案
我们可以查询数据字典来确定每个会话中打开的光标数。"V$SESSION" 提供的当前打开光标数比 "V$OPEN_CURSOR" 更准确。
示例
select a.value ,c.username ,c.machine ,c.sid ,c.serial# from v$sesstat a ,v$statname b ,v$session c where a.statistic# = b.statistic# and c.sid = a.sid and b.name = 'opened cursors current' and a.value != 0 and c.username IS NOT NULL order by 1,2;
OPEN_CURSORS 初始化参数决定了一个会话可打开的最大光标数。
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP