Re: Is there a trigger on session end?
Date: Sun, 2 Mar 2008 05:06:38 -0800 (PST)
On Feb 29, 4:08 pm, DA Morgan <damor..._at_psoug.org> wrote:
> dean wrote:
> > 10g / Win
> > I have a trigger that calls a procedure when a user logs off session:
> > create or replace trigger LoggedOff
> > before logoff on database
> > call procLoggedOff
> > /
> > But this trigger is not called if my session ends unexpectedly - a
> > crash or if the app is killed by some means (simple crash, compiler
> > reset, CTRL-ALT_DEL, etc).
> > Is there a way to get Oracle to call a procedure when it determines
> > that a session has been killed or otherwise has died?
> > Thanks in advance for any advice.
> You can create a SYSTEM EVENT trigger to fire on AFTER SERVERERROR.
> Should work for what you want.
Referring to this page:
AFTER SERVERERROR (does not trap ...
- ORA-01403: no data found (this is in the Oracle docs but does not seem to be correct)
- ORA-01422: exact fetch returns more than requested number of rows
- ORA-01423: error encountered while checking for extra rows in exact fetch
- ORA-01034: ORACLE not available
- ORA-04030: out of process memory when trying to allocate string bytes (string, string)
So u may have to take note that certain class of errors cannot be captured. Or is my interpretation wrong?
Thanks. Received on Sun Mar 02 2008 - 07:06:38 CST