-
Hi,
I would like to track user logons to a system we have in place. Can I use v$session in a procedure in order to populate a table which will store user logon times?
If so, do I need to have DBA privileges, and are there other restrictions?
Thanks
-
You should look at a the LOGON trigger. ( http://technet.oracle.com/docs/produ...6d.htm#2064212 )
This trigger will fire every time somebody logs into the database. You can capture their information from there. There is also a logoff trigger where you can capture information.
-
Jeff suggestion is totaly valid. Hovewer if it is only users logon times you are interesting in then you should consider turning auditing on.
Just set AUDIT_TRAIL=DB in your init.ora, bounce the database and you are all set. If you don't specify anything particular to audit, the database will by default log all user logons/logoffs.
This option definitely brings less overhead then any other solution.
HTH,
-
I've forgot to mention in my previous post:
Do not try to find the solution to your problem in direction: "puting trigger on V$SESSIN or something similar...". You can't create trigger on any object owned by SYS, no way....