Oracle 查询历史连接主机信息

---查询历史连接主机信息

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'

转自:https://www.cnblogs.com/ss-33/p/10972948.html

posted @ 2020-04-11 11:04  快看,阳光!  阅读(730)  评论(0编辑  收藏  举报