Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle to capture user logon and logoff timings

supersenApr 30 2020 — edited May 21 2020

Hi All,

I got requirement to capture user logon and logoff timings in separate tables.  what is the best option i can go for

OPTION1:  write LOGON and LOGOFF triggers  and capture the info from v$session and write it to the tables

OPTION2:  AUDITING is enabled.  use DBA_AUDIT_SESSION table for the information

OPTION1 WORKAROUND: 

i just created trigger  with  AFTER LOGON to capture the infomation from v$session   but i am getting error as "TABLE OR VIEW DOES NOT EXISTS "  for selecting the data from v$session. i  dont have dba privileges for this.

OPTION2 WORKAROUND:

DBA_AUDIT_SESSION has all information of user login and logoff timings.  is it possible  that i can make use of this table for my analysis. that means write trigger or create  VIEW from DBA_AUDIT_SESSION table  for the columns USERNAME, ACTION_NAME, EXTENDED_TIMESTAMP (  i am using extended timestamp here because timestamp column not showing accurate tming and it shows only date)

Please add your thoughts

Thanks

Supersent

Comments
Post Details
Added on Apr 30 2020
11 comments
3,624 views