0

How can I get logon events from audit table for Feb, June, Oct and Dec?

I tried the query below, but it retrieves a lot of duplicate rows although I am using the distinct keyword in the query. Also this query takes long time.

select   distinct os_username ,username, userhost, terminal, timestamp, action_name,
         logoff_time
from     dba_audit_session
where    timestamp between '01-FEB-2017' and '28-FEB-2017'
order by timestamp;
-1

your timestamp and logoff_time columns contained time part too, please use trunc if you do not wish to consider the time part and then use the distinct.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.