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
If all you want is the logoff time then you don't
need a trigger.
init.ora
From SQL*Plus
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 ...Received on Mon Oct 28 2002 - 22:48:24 CST
>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?
>
>