ASHから日時を指定して情報を取得

軍鶏/ 7月 7, 2020/ 未分類

以下のSQLを実行
--USER_IDはV$SESSIONのUSER#に呼応する。ユーザ名はV$SESSIONのUSERNAME
select *
from v$active_session_history
--from dba_hist_active_sess_history
where SAMPLE_TIME
between to_date('2017-10-19 19:00:00','YYYY-MM-DD HH24:MI:SS') -- 開始時間
and to_date('2017-10-19 21:00:00','YYYY-MM-DD HH24:MI:SS') -- 終了時間
order by sample_time;

Share this Post