0

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

If possible where we can find this information?

2 Answers 2

2

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 ).

0
0

You could use after logon to database trigger for this purpose also.

For example, create table with columns of your interest ( username, machine, program...), then create after logon trigger and populate your table with data from v$session. Or from some other system table, whatever best suits your needs.

http://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_2088.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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