查看当前session数
select count(*),MACHINE from v$session group by MACHINE
查看历史session数
select to_char(SAMPLE_TIMe, 'yyyymmdd hh24:mi'),session_type--,module,PROGRAM ,machine,
count(*)
from sys.GV_$ACTIVE_SESSION_HISTORY s
where SAMPLE_TIMe >=sysdate-30
and SAMPLE_TIMe < sysdate
and session_type<>'BACKGROUND'
--and program='JDBC Thin Client'
group by to_char(SAMPLE_TIMe, 'yyyymmdd hh24:mi'),session_type--,module,PROGRAM,machine
--having count(*)>10
order by 1;