Is it possible to know how many times a user connected to an Oracle database

oracle

Is it possible to know how many times a user connected to an Oracle database?

If possible where we can find this information?

Best Answer

If audit is enabled, you can check DBA_AUDIT_SESSION/USER_AUDIT_SESSION (More info about auditing - Audit doc). Another option is to check dba_hist_active_sess_history - you will need to write a query that counts distinct serials/sessions to get rough number of user logins assuming user did anything during the session. Also, you won't be able to go too far in the past with dba_hist_active_sess_history - it's a view based on tables populated by AWR which automatically deletes old records (as far as I remember default retention period is 1 week ).