--各用户的打开游标总数 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;