-- cur2.sql: the same, grouped by machine only -- Copyright (c) HASHJOIN. MIT License (https://hashjoin.com/kb/license/) -- https://hashjoin.com/kb/oracle/open-cursors-by-session/ -- -- Usage: @cur2.sql -- @cur2.sql 200 set lines 132 set trims on col machine format a35 select count(*), machine,status from gv$session where (inst_id,sid) in (select st.inst_id, st.sid from gv$sesstat st, v$statname n where st.statistic# = n.statistic# and n.name = 'opened cursors current' and st.value > &&1) group by machine,status; undefine 1