Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: About getting real time of user application discinnect

Re: About getting real time of user application discinnect

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 29 Oct 2002 04:48:24 -0000
Message-ID: <apl471$hoa$1$8300dec7@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





Vitaliy Ogiychuk wrote in message ...

>I have a trigger
>
>CREATE OR REPLACE TRIGGER TBL_DISCONNECT BEFORE LOGOFF DATABASE
>DECLARE
> SID NUMBER;
>BEGIN
> SELECT USERENV('SESSIONID') INTO SID FROM DUAL;
> INSERT INTO USERID(SID, LOGOFF_TIME)
> VALUES (SID, SYSDATE);
>END;
>
>The trigger insert time of application disconnect in specified table.
But
>the trigger fires only if application terminated successfully.
>Question: how Oracle may determine that application was break (such
as pull
>out the network cable or shutdown the user's terminal) and set it
disconnect
>time without waiting of killing application session by PMon?
>
>
Received on Mon Oct 28 2002 - 22:48:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US