ORACLE 相关游标数 查询
发布时间:2020-12-12 14:00:57 所属栏目:百科 来源:网络整理
导读:--各用户的打开游标总数 SELECT A.USER_NAME,COUNT(*) FROM V$OPEN_CURSOR A GROUP BY A.USER_NAME; --查找数据库各用户各个终端的缓存游标数 SELECT AA.USERNAME,AA.MACHINE,SUM(AA.VALUE) FROM (SELECT A.VALUE,S.MACHINE,S.USERNAME FROM V$SESSTAT A,V$S
--各用户的打开游标总数 SELECT A.USER_NAME,COUNT(*) FROM V$OPEN_CURSOR A GROUP BY A.USER_NAME; --查找数据库各用户各个终端的缓存游标数 SELECT AA.USERNAME,AA.MACHINE,SUM(AA.VALUE) FROM (SELECT A.VALUE,S.MACHINE,S.USERNAME FROM V$SESSTAT A,V$STATNAME B,V$SESSION S WHERE A.STATISTIC# = B.STATISTIC# AND S.SID = A.SID AND B.NAME = 'session cursor cache count') AA GROUP BY AA.USERNAME,AA.MACHINE ORDER BY AA.USERNAME,AA.MACHINE; --查找数据库各用户各个终端的打开游标数 SELECT AA.USERNAME,S.USERNAME FROM V$SESSTAT A,V$SESSION S WHERE A.STATISTIC# = B.STATISTIC# AND S.SID = A.SID AND B.NAME = 'opened cursors current') AA GROUP BY AA.USERNAME,AA.MACHINE; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |