-
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. ( [url]http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a85397/statem6d.htm#2064212[/url] )
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 Hunter
-
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,
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
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....
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|