Re: Turning off DML commit when session is exited or disconnected

From: Cristian Cudizio <cristian.cudizio_at_yahoo.it>
Date: Thu, 18 Dec 2008 07:25:07 -0800 (PST)
Message-ID: <287a9d2f-0173-404f-b180-c5a0453297dd@o40g2000prn.googlegroups.com>


On 18 Dic, 15:49, sybrandb <sybra..._at_gmail.com> wrote:
> On 18 dec, 15:12, Cristian Cudizio <cristian.cudi..._at_yahoo.it> wrote:
>
>
>
> > On 18 Dic, 14:04, sybrandb <sybra..._at_gmail.com> wrote:
>
> > > On 18 dec, 12:28, oracle user <rcl..._at_gmail.com> wrote:
>
> > > > If i issue a DML statment in oracle database from sqlplus session
> > > > (where autocommit is off by default ) and then 'exit' or 'disc' the
> > > > session without explicitly commiting the DML ,the DML gets commited .
> > > > Is it possible to turn off this default behaviour.
> > > > Thanks in Advance
>
> > > It is NOT possible.
> > > How would it be? By design, your transaction ends by exiting Oracle.
> > > It is a feature of the database, not of sql*plus.
> > > If you don't want to commit your transaction, you issue rollback.
> > > This won't get you RSI.
>
> > > --
> > > Sybrand Bakker
> > > Senior Oracle DBA
>
> > Well, i've to admit that this for me is a surprise. I've always used
> > explicit commit or rollback
> > but i've never knew that exiting or disconnecting from sqlplus
> > transaction gets automatically
> > committed.  It is true that this behaviour cannot be changed, but it
> > is a feature
> > of SQL*Plus (http://download.oracle.com/docs/cd/B19306_01/server.102/
> > b14357/ch12023.htm#i2697968)
> > If you kill a session, oracle rollbacks any changes.
>
> > Regards,
> >  Cristian- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -
>
> Cristian,
> It is NOT a feature of sql*plus. It is a feature of Oracle.
> It applies to anything connecting to Oracle, leaving with a proper
> exit command.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

Thanks Sybrand, you are right, i've confused closing a session with recovering a crashed session. I've seen that also jdbc drivers on closing
the connection do an implicit commit
http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/basic.htm#sthref74

Regards,
 Cristian Received on Thu Dec 18 2008 - 09:25:07 CST

Original text of this message