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

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Fri, 29 Aug 2008 08:28:07 -0700 (PDT)
Message-ID: <e0936287-c107-4a63-a803-1b7d7e400792@k30g2000hse.googlegroups.com>


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 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+.

HTH -- Mark D Powell -- Received on Fri Aug 29 2008 - 10:28:07 CDT

Original text of this message