Considering the current below query is ok for the scope, you have two options:
select os_username, username, terminal, userhost,
to_char(timestamp,'MM-DD-YYYY HH24:MI:SS') logon_time,
to_char(logoff_time,'MM-DD-YYYY HH24:MI:SS') logoff_time
from dba_audit_trail
where timestamp >= SYSDATE - 7
order by timestamp desc;
1. Run a scheduled job at the time you specify of type Run OS Cmd. In the OS Command you can write for example:
sqlplus username/password@alias @/path/dba_script.sql where in the dba_script.sql you will have your query definition.
OR
2. Created a report and stored it into Stat DB so you can run from Report Wizard or schedule it to run in a job.
- Have to copy your own report 'my_dba_audit_hist.jrxml' on the SCA machine under $STAT_HOME/report/table_dump/format
- By Stat Client go to Maintenance | General | Stat Report and create a new Report to set the report definition pointing to it then click Apply.