Re: Can we trigger event for abnormal loss of connection to oracle databse?

From: <fitzjarrell_at_cox.net>
Date: Fri, 29 Aug 2008 12:19:59 -0700 (PDT)
Message-ID: <9da64fbd-7b4f-4657-9e71-32da508e9e85@f63g2000hsf.googlegroups.com>


On Aug 29, 1:46 pm, Palooka <nob..._at_nowhere.com> wrote:
> fitzjarr..._at_cox.net wrote:
> > Comments embedded.
> > On Aug 29, 10:28 am, Mark D Powell <Mark.Pow..._at_eds.com> wrote:
> >> On Aug 29, 10:50 am, sybra..._at_hccnet.nl wrote:
>
> >>> On Fri, 29 Aug 2008 06:56:36 -0700 (PDT), shilpa
> >>> <shilpa.uttar..._at_gmail.com> wrote:
> >>>> ORACLE Database :
> >>>> I want a trigger to get fired when my application’s connection to the
> >>>> database gets disconnected abnormally.
> >>>> I plan to monitor the Server Name and its status in the “ v$session“
> >>>> table.
> >>>> Can I write a trigger that gets fired when “ v$session“ table gets
> >>>> edited? How can I achieve it?
> >>>> Is there any other way to execute a stored procedure and perform some
> >>>> steps when a connection is lost to a database?
> >>>> Any comments/suggestions would be appreciated.
> >>>> Thanks..
> >>> audit connect will do the trick automagically.
> >>> It records the error status at every disconnect.
> >>> 0 for normal disconnect, non-zero for all others.
> >>> --
> >>> Sybrand Bakker
> >>> Senior Oracle DBA- Hide quoted text -
> >>> - Show quoted text -
> >> Question, isn't the command "audit session" rather than audit connect?
>
> > In 9.2.0 and later releases the AUDIT CONNECT statement is valid.
>
> >> In my past experience auditing sessions if the session terminated
> >> abnormally there was no disconnect entry in the audit trail.  I have
> >> not used the command since 8.1.7 but I am pretty sure this is still
> >> true on 9.2.  I do not know about with 10g+
>
> > Provided audit_trail is set to DB the DBA_AUDIT_SESSION view will
> > provide the logoff_time and the returncode, which will be non-zero for
> > abnormally terminated sessions.  And this applies to databases from
> > 9.2.0.x  onwards.
> > .
> >> HTH -- Mark D Powell --- Hide quoted text -
>
> >> - Show quoted text -
>
> > David Fitzjarrell
>
> One wonders though what OP is trying to achieve exactly. Why is he
> wondering about abnormal disconnects? Is it perhaps because the
> application is buggy?
>
> Palooka- Hide quoted text -
>
> - Show quoted text -

Or the network is flaky and he/she is trying to prove it.

David Fitzjarrell Received on Fri Aug 29 2008 - 14:19:59 CDT

Original text of this message