---查询历史连接主机信息
select distinct a.machine,a.program,a.module
from dba_hist_active_sess_history a
where a.SAMPLE_TIME BETWEEN
TO_DATE('2019-06-04 12:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_DATE('2019-06-04 13:00:00', 'YYYY-MM-DD HH24:MI:SS')
select distinct d.program,d.module,d.machine
from v$active_session_history D
WHERE d.SAMPLE_TIME BETWEEN
TO_DATE('2019-06-04 12:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_DATE('2019-06-04 13:00:00', 'YYYY-MM-DD HH24:MI:SS')
select distinct a.machine,a.program
from v$session a
where status = 'INACTIVE'