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: uncomitted data gets committed when application dies

Re: uncomitted data gets committed when application dies

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 8 Dec 2004 18:45:54 +0100
Message-ID: <cp7ekh$3qe$1@nntp.fujitsu-siemens.com>

<yong321_at_yahoo.com> schrieb im Newsbeitrag news:1102527709.194220.232000_at_z14g2000cwz.googlegroups.com...
> Volker Hetzer wrote:
> > Hi!
> > I've got a problem with a library I use for accessing oracle.
> > Basically, I use Oratcl ans Tcl/Tk and I take a lot of care not to
> > commit any data if everything is not in order. But, if the app gets
> > killed for some reason, the *uncomitted* data appears visible in
> > the database!
> > I just contacted the guy who wrote the Oratcl extension and
> > his answer was:
> >
> > "This seems to be standard behavior with oracle client libraries.
> > I have had this happen in multiple oracle versions and with
> SQL*Plus."
> >
> > Is there any way I can configure the session or the database to
> rollback
> > any uncomitted changes when the database detects a dead session?
>
> Can you try creating a logoff trigger:
>
> create or replace trigger t
> before logoff on database
> begin
> rollback;
> end;
> /

Sounds great! That's what I'll test next. This as the first command in the session ought to do the trick.

>
> Does this problem only happen to your OraTcl session? I can't imagine
> it happens to a sqlplus session.

Sqlplus is quite hard to kill properly, maybe they built in lots of stuff to catch everything and do an explicit rollback.
I'll have to check that too.

Lots of Greetings and thanks!
Volker Received on Wed Dec 08 2004 - 11:45:54 CST

Original text of this message

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