The number of active cursor cursqueries SQL [SQL] www.2cto.com select allcursor all cursors, MYALLCURSOR my cursnumber, myopencursor I open cursnumber, MYCACHECURSOR my SESSION cache cursnumber, (MYALLCURSOR-MYOPENCURSOR-MYCACHECURSOR) Number of my other cursfrom (select count (*) from v $ OPEN_CURSOR A) ALLCURSOR, (select count (*) from v $ OPEN_CURSOR a where. USER_NAME = 'telsoft _ R_01 ') MYALLCURSOR, (select sum (AA. VALUE) FROM (select. value from v $ sesstat a, V $ statname B, V $ SESSION S WHERE. STATISTIC # = B. STATISTIC # and s. SID =. sid and B. NAME = 'session cursor cache count' and s. USERNAME = 'telsoft _ R_01 ') AA) MYCACHECURSOR, (select sum (AA. VALUE) FROM (select. value from v $ sesstat a, V $ statname B, V $ SESSION S WHERE. STATISTIC # = B. STATISTIC # and s. SID =. sid and B. NAME = 'opened cursors current 'and s. USERNAME = 'telsoft _ R_01 ') AA) myopencursor from dual); -- query the total number of open cursors of each user (including cache cursors) select. USER_NAME, COUNT (*) Total number of open cursors for each user from v $ OPEN_CURSOR a group by. USER_NAME; -- query the number of cache cursors of each database user terminal. select aa. USERNAME, AA. MACHINE, SUM (AA. VALUE) Number of cached cursors FROM (select. VALUE, S. MACHINE, S. username from v $ sesstat a, V $ statname B, V $ SESSION S WHERE. STATISTIC # = B. STATISTIC # and s. SID =. sid and B. NAME = 'session cursor cache count') aa group by aa. USERNAME, AA. machine order by aa. USERNAME, AA. MACHINE; -- find the number of open cursors for each terminal of the database user select aa. USERNAME, AA. MACHINE, SUM (AA. VALUE) Open the number of cursors FROM (select. VALUE, S. MACHINE, S. username from v $ sesstat a, V $ statname B, V $ SESSION S WHERE. STATISTIC # = B. STATISTIC # and s. SID =. sid and B. NAME = 'opened cursors current ') aa group by aa. USERNAME, AA. machine order by aa. USERNAME, AA. MACHINE;