Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: About getting real time of user application discinnect
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:<apl471$hoa$1$8300dec7_at_news.demon.co.uk>...
> If all you want is the logoff time then you don't
> need a trigger.
>
> init.ora
> ----------
> audit_trail=db
>
> From SQL*Plus
> -----------------------
> audit create session
> or
> audit connect
>
> Then check the dba_audit_xxx views, I think
> the one you want is still called
> dba_audit_connect.
>
> This tracks logon logoff for a session, but
> I am fairly sure that pmon populates this one
> for your session if your session dies.
>
> --
> Regards
>
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
> Next Seminar dates:
> (see http://www.jlcomp.demon.co.uk/seminar.html )
>
> ____USA__________November 7/9 (Detroit)
> ____USA__________November 19/21 (Dallas)
> ____England______November 12/14
>
> The Co-operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
TI am pretty sure the view name, which Jonathan did not have time to look up, is dba_audit_session, and if all you need is logon/logoff times then this is a better approach that db event triggers. The DBA Admin manual has a chapter on database auditing that is fairly complete and may be of interest.
HTH -- Mark D Powell -- Received on Tue Oct 29 2002 - 08:16:09 CST