Бих предложил да запазите статистическите си данни в таблица (кажете my_log_table
), в този случай графикът би изглеждал така:
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'keep_stats',
job_type => 'PLSQL_BLOCK',
job_action => 'begin insert into my_log_table (mUser,mCnt) (select osuser, count(osuser) as active_conn_count from v$session group by osuser order by active_conn_count desc);commit;end;',
start_date => timestamp '2016-11-07 19:00:00',
repeat_interval => 'FREQ=MINUTELY;INTERVAL=30;',
enabled => TRUE);
end;